joi, 2 septembrie 2010

How to change the Shape of your appli...

How to change the Shape of your application?


  • Create a Form
  • Add namespace System.Drawing.Drawing2D
  • Assign a new shape to its Region Property

You can do this on Load event:

        private void Form1_Load(object sender, EventArgs e)
        {
            GraphicsPath _graphicsPath = new GraphicsPath();
            _graphicsPath.AddArc(0, 0, Width, Height, 20, -270);
            Region = new Region(_graphicsPath);
        }

This is the result:

Niciun comentariu:

Trimiteți un comentariu