472,121 Members | 1,567 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,121 software developers and data experts.

C# Roate image problem in a windows form

Okay so I want to rotate an image. However the rotate command is doing nothing. I've tried this with both JPEG and Bitmap images.

I just have a button and a picturebox. When i click the button the picturebox should rotate 90 degrees, however it does not do anything at all. Here is the code for the thing:

I tried it this way:
pictureBox1.Image.RotateFlip(System.Drawing.Rotate FlipType.Rotate90FlipNone);

and this way:
pictureBox1.Image.RotateFlip(RotateFlipType.Rotate 90FlipNone);

Both do nothing. The program runs fine though, no errors.

Any reason for this? Or is there another way to rotate an image?
Dec 22 '07 #1
2 2010
Mr E
"pictureBox1.Image.RotateFlip(RotateFlipType.Rotat e 90FlipNone);"

I don't see why that doesn't work, try putting a breakpoint on that line of code to make sure it is being run.
Dec 22 '07 #2
Ok so when I put this code:


I also ran this just in case it needed to be like this:

pictureBox1.Image.RotateFlip(RotateFlipType.Rotate 90FlipNone);


which I think is a breakpoint code, and run it in the debug mode it shows that it gets to the part of the code. I does stop responding after hit the button and the breakpoint code is run.

Is there a possibility of a form property that may be hindering the working of that command?
Dec 22 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Jeff Griffin | last post: by
2 posts views Thread by Don Tucker | last post: by
10 posts views Thread by Adam Honek | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.