-1

PictureBox in C# is rectangular. I want to load picture in PictureBox in circle to manipulated it.

How to do it?

Alexei Levenkov
  • 98,904
  • 14
  • 127
  • 179
kha
  • 349
  • 3
  • 18
  • 3
    check this- http://stackoverflow.com/questions/7731855/rounded-edges-in-picturebox-c-sharp possible duplicate – DevT Nov 15 '13 at 06:21

1 Answers1

1

From here:-

[Rectangle r = new Rectangle(0, 0, pictureBox1.Width, pictureBox1.Height);
System.Drawing.Drawing2D.GraphicsPath gp = new System.Drawing.Drawing2D.GraphicsPath();
int d = 50;
gp.AddArc(r.X, r.Y, d, d, 180, 90);
gp.AddArc(r.X + r.Width - d, r.Y, d, d, 270, 90);
gp.AddArc(r.X + r.Width - d, r.Y + r.Height - d, d, d, 0, 90);
gp.AddArc(r.X, r.Y + r.Height - d, d, d, 90, 90);
pictureBox1.Region = new Region(gp);][2]
Rahul Tripathi
  • 168,305
  • 31
  • 280
  • 331