Click here to Skip to main content
12,452,251 members (56,136 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

34.1K views
3 bookmarked
Posted

Rotate PictureBox Images in C#

, 23 Jan 2012 CPOL
Rate this:
Please Sign up or sign in to vote.
How to rotate images in a PictureBox.

You can rotate images in a PictureBox using the following code..

Rotate right:

Image img = pictureBox1.Image;
img.RotateFlip(RotateFlipType.Rotate90FlipNone);
pictureBox1.Image = img;

Rotate left:

Image img = pictureBox1.Image;
img.RotateFlip(RotateFlipType.Rotate270FlipNone);
pictureBox1.Image = img;

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Dhanushka Madushan lk
Software Developer
Sri Lanka Sri Lanka
No Biography provided

You may also be interested in...

Pro
Pro

Comments and Discussions

 
QuestionRotate Image C++ Code Pin
Member 43393754-Sep-14 5:32
memberMember 43393754-Sep-14 5:32 
QuestionExactly what I needed Pin
Wakabajashij16-Dec-13 5:52
memberWakabajashij16-Dec-13 5:52 
GeneralMy vote of 2 Pin
I Spawn At Home4-Mar-13 20:39
memberI Spawn At Home4-Mar-13 20:39 
GeneralMy vote of 2 Pin
Abed AlSayed4-Sep-12 4:35
memberAbed AlSayed4-Sep-12 4:35 
GeneralReason for my vote of 5 Excellent - just what I needed to kn... Pin
Member 19049705-Feb-12 8:59
memberMember 19049705-Feb-12 8:59 
GeneralRe: Reason for my vote of 5Excellent - just what I needed to kn... Pin
Dhanushka Madushan lk12-Apr-12 16:58
memberDhanushka Madushan lk12-Apr-12 16:58 
GeneralIm new to CodeProject...just put it to check.. Pin
Dhanushka Madushan Peiris24-Jan-12 2:46
memberDhanushka Madushan Peiris24-Jan-12 2:46 
GeneralReason for my vote of 1 pitifully Pin
muellerh24-Jan-12 1:14
membermuellerh24-Jan-12 1:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160826.1 | Last Updated 23 Jan 2012
Article Copyright 2012 by Dhanushka Madushan lk
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid