private void SetFormCircle() { int radian = 4; //圆弧角的比率,可以自己改变这个值看具体的效果 int w = this.Width; //窗体宽 int h = this.Height; //窗体高 //对于矩形的窗体,要在一个角上画个弧度至少需要2个点,所以4个角需要至少8个点 Point p1 = new Point(radian, 0); Point p2 = new Point(w ? radian, 0); Point p3 = new Point(w, radian); Point p4 = new Point(w, h ? radian); Point p5 = new Point(w ? radian, h); Point p6 = new Point(radian, h); Point p7 = new Point(0, h ? radian); Point p8 = new Point(0, radian); System.Drawing.Drawing2D.GraphicsPath shape = new System.Drawing.Drawing2D.GraphicsPath(); Point[] p = new Point[] { p1, p2, p3, p4, p5, p6, p7, p8 }; shape.AddPolygon(p); //将窗体的显示区域设为GraphicsPath的实例 this.Region = new System.Drawing.Region(shape); }