public void SetWindowRegion() { System.Drawing.Drawing2D.GraphicsPath FormPath; FormPath = new System.Drawing.Drawing2D.GraphicsPath(); Rectangle rect=new Rectangle(0,22,this.Width,this.Height-22);//this.Left-10,this.Top-10,this.Width-10,this.Height-10); FormPath = GetRoundedRectPath(rect, 30); this.Region = new Region(FormPath); } private GraphicsPath GetRoundedRectPath(Rectangle rect, int radius)