473,386 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 2103
Mr E
2
"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:

#if DEBUG
System.Diagnostics.Debugger.Break();
#endif

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

#if DEBUG
pictureBox1.Image.RotateFlip(RotateFlipType.Rotate 90FlipNone);

System.Diagnostics.Debugger.Break();
#endif

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

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

Similar topics

2
by: Bill N. | last post by:
Using VB .Net 2003 Standard Edition. This simple form has a "File in Use" problem while the executable is running. Created this simple program to make sure that I hadn't done something in my...
4
by: Kevin Myers | last post by:
Hello, Please forgive my reposting of this note with hopefully a more relevant subject line. On an Access 2000 form under Windows 2000 I would like to use a Kodak Image Edit Control to...
4
by: Jeff Griffin | last post by:
OK, this should be my last question for the day. I have spent a couple hours on google trying to figure this out but I probibly just dont know what I really need to be searching for. I have a...
1
by: Novice | last post by:
I'm afraid I will incur the wraith of Mr. Powell on this one - but I did read his #1 FAQ and some others and I still can't figure this out. I created this little c# app. and I have a PictureBox...
2
by: Don Tucker | last post by:
Hello, I have a Windows Application that needs to load multiple image files in response to users clicking buttons. Currently, I just have these images as .jpg files on disk, but I don't want to...
7
by: moondaddy | last post by:
I'm painting images onto a windows form using this method: e.Graphics.DrawImageUnscaled(m_ItemImage, x, y) every time I select a product. However, some products don't have an image so when a...
8
by: Matt | last post by:
I've been searching around for a simple way to display a background image in my MDI form's client area. I want to be able to load the image from file on start up and have it resize as the MDI form...
0
by: Deepak C.G via .NET 247 | last post by:
I want to dispose the image object in my child form, unless I won't dispose this object i can't delete the image file in my folder. I get this error in MDIparent form "An unhandled exception...
10
by: Adam Honek | last post by:
This is probably a silly question but oh well, I can't find the answer looking via code. Having an imagelist already, how does one set an icon for a list view's sub items? I'm using the code...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.