How to make a Non Rectangular Winforms ?
- by karthik
I am using the below code to change to shape of the winform.
Its changing the shape, but not like how i wanted.
I need the forms to have curved corners.
What points should i use to get it ?
public void MakeNonRectangularForm()
{
System.Drawing.Drawing2D.GraphicsPath p = new System.Drawing.Drawing2D.GraphicsPath();
int width = this.ClientSize.Width;
int height = this.ClientSize.Height;
p.AddClosedCurve(new Point[]{new Point(width/2, height/2),
new Point(width,0), new Point(width, height/3),
new Point(width-width/3, height),
new Point(width/7, height-height/8)});
this.Region = new Region(p);
}