Tuesday, September 8, 2009

How to change the windows form shape in C#

you can change the windows form shape what ever you want. Cool ah.. 


Lets try to do this.

  • Add new form to your project. (set FormBorderStyle  to None)


  • Use following code for form load
private void Form1_Load(object sender, EventArgs e)
GraphicsPath g = new GraphicsPath();
//using System.Drawing.Drawing2D;
g.AddEllipse(0, 0, 200, 200);

Region r = new Region(g);
this.Region = r;
Post a Comment