Create Round Form in C# Application

1) Create Simple Window Application (C#).

2) in the form set below property.

startposition : CenterScreen
MaximizeBox :False
MinimizeBox :False
Size :
Width :400
Height:400
FormBorderStyle :none

3)  in the form paint event put below code.

private void Form1_Paint(object sender, PaintEventArgs e)
{
System.Drawing.Drawing2D.GraphicsPath objGP = new System.Drawing.Drawing2D.GraphicsPath();
objGP.AddEllipse(new Rectangle(0, 0,this.Width, this.Height));
this.Region = new Region(objGP);
this.FormBorderStyle = FormBorderStyle.None;
}
Thnx.

Advertisements

4 comments

  1. Ehm….mau tanya….
    gimana kalau roundednya berbentuk persegi yang tiap sudutnya rounded???
    makasih ya….

    1. Hello Lili,
      I m not getting your language Please ask in English.

      thnx

  2. thanks patriwala

  3. hi patriwal,
    tanx dude u r really genius…..i was try to find how to make a round form….and ur code is just awesome its sloved ma provlem .

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s