Hi All,
In C# Winforms we can give a rounded corner effect to a form from the following code snippet.
protected void RePaint()
{
GraphicsPath graphicpath = new graphicsPath();
graphicpath.StartFigure();
graphicpath.AddArc(0,0,25,25,180,90);
graphicpath.AddLine(25,0,this.Width-25,0);
graphicpath.AddArc(this.Width-25,0,25,25,270,90);
graphicpath.AddLine(this.Width,25,this.Width,this.Height-25);
graphicpath.AddArc(this.Width-25,this.Height-25,25,25,0,90);
graphicpath.AddLine(this.Width-25,this.height,25,this.Height);
graphicpath.AddArc(0,this.Height-25,25,25,90,90);
graphicpath.CloseFigure();
this.Region = new Region(graphicpath)
}
On every form RePaint() Event, it will draw a rounded corner form.
Thanks and regards
PMM :)