Connecting Tech Pros Worldwide Forums | Help | Site Map

Image rotation doesn't take effect till...

kimiraikkonen
Guest
 
Posts: n/a
#1: Dec 24 '07
Hi,
Here is a very interesting issue,
Assume i have picturebox and loaded a image into picturebox, however
whenever i want to rotate image using:

'For example 90 degree
PictureBox1.Image.RotateFlip(RotateFlipType.Rotate 90FlipX)

This rotation takes effect on picturebox after i minimize - remaximize
form OR after i drag form somewhere outside the screen the re-bring to
a visible location on the screen.

If i don't drag form somewhere outside the screen OR minimize then re-
bring to normal window position.

Is this a bug or how can i overcome this?

Thanks a lot!

Michael D. Ober
Guest
 
Posts: n/a
#2: Dec 24 '07

re: Image rotation doesn't take effect till...


"kimiraikkonen" <kimiraikkonen85@gmail.comwrote in message
news:70ea9cfc-ec84-46fd-88ce-95b94de4e6cb@e23g2000prf.googlegroups.com...
Quote:
Hi,
Here is a very interesting issue,
Assume i have picturebox and loaded a image into picturebox, however
whenever i want to rotate image using:
>
'For example 90 degree
PictureBox1.Image.RotateFlip(RotateFlipType.Rotate 90FlipX)
>
This rotation takes effect on picturebox after i minimize - remaximize
form OR after i drag form somewhere outside the screen the re-bring to
a visible location on the screen.
>
If i don't drag form somewhere outside the screen OR minimize then re-
bring to normal window position.
>
Is this a bug or how can i overcome this?
>
Thanks a lot!
>
Have you tried a form Refresh() or picturebox Refresh() after the rotation?

Mike Ober.


kimiraikkonen
Guest
 
Posts: n/a
#3: Dec 24 '07

re: Image rotation doesn't take effect till...


On Dec 24, 11:25 pm, kimiraikkonen <kimiraikkone...@gmail.comwrote:
Quote:
Hi,
Here is a very interesting issue,
Assume i have picturebox and loaded a image into picturebox, however
whenever i want to rotate image using:
>
'For example 90 degree
PictureBox1.Image.RotateFlip(RotateFlipType.Rotate 90FlipX)
>
This rotation takes effect on picturebox after i minimize - remaximize
form OR after i drag form somewhere outside the screen the re-bring to
a visible location on the screen.
>
If i don't drag form somewhere outside the screen OR minimize then re-
bring to normal window position.
>
Is this a bug or how can i overcome this?
>
Thanks a lot!
However this a kind of indirect solution which corrects this but still
i want to know why i need to adjust visibility propery of picturebox.

PictureBox1.Image.RotateFlip(RotateFlipType.Rotate 90FlipX)
PictureBox1.Visible = False
PictureBox1.Visible = True

Another issue, as i stated in a post with no reply, while dragging
picturebox the image and form gets a very slow performance and jittery
tearing effects occur on screen. There's no such problem on 3rd party
softwares like XnView using on same system.

Thanks.
kimiraikkonen
Guest
 
Posts: n/a
#4: Dec 24 '07

re: Image rotation doesn't take effect till...


On Dec 24, 11:30 pm, "Michael D. Ober" <obermd.@.alum.mit.edu.nospam.>
wrote:
Quote:
"kimiraikkonen" <kimiraikkone...@gmail.comwrote in message
>
news:70ea9cfc-ec84-46fd-88ce-95b94de4e6cb@e23g2000prf.googlegroups.com...
>
>
>
Quote:
Hi,
Here is a very interesting issue,
Assume i have picturebox and loaded a image into picturebox, however
whenever i want to rotate image using:
>
Quote:
'For example 90 degree
PictureBox1.Image.RotateFlip(RotateFlipType.Rotate 90FlipX)
>
Quote:
This rotation takes effect on picturebox after i minimize - remaximize
form OR after i drag form somewhere outside the screen the re-bring to
a visible location on the screen.
>
Quote:
If i don't drag form somewhere outside the screen OR minimize then re-
bring to normal window position.
>
Quote:
Is this a bug or how can i overcome this?
>
Quote:
Thanks a lot!
>
Have you tried a form Refresh() or picturebox Refresh() after the rotation?
>
Mike Ober.
Hi! Thank you, refresh function does it without needing to refresh
picturebox using visible property to false / true :-)
Closed Thread