private void Form1_Load(object sender, System.EventArgs e) { GraphicsPath gp=new GraphicsPath(); gp.AddEllipse(15,15,15,15); Region r=new Region(gp); this.Region = r; }
Point[] myArray = { new Point(this.Width / 2, 0), new Point(this.Width, this.Height / 2), new Point(this.Width * 2 / 3, this.Height), new Point(this.Width * 1 / 3, this.Height), new Point(0, this.Height / 2) }; System.Drawing.Drawing2D.GraphicsPath myPath = new System.Drawing.Drawing2D.GraphicsPath(); myPath.AddPolygon(myArray); this.Region = new Region(myPath);