65.9K
CodeProject is changing. Read more.
Home

Rotate PictureBox Images in C#

starIconstarIconstarIconstarIcon
emptyStarIcon
starIcon

4.87/5 (12 votes)

Jan 23, 2012

CPOL
viewsIcon

78994

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;