private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e) { System.Drawing.Drawing2D.GraphicsPath myPath = new System.Drawing.Drawing2D.GraphicsPath(); myPath.AddEllipse(0,0, 1000, 1000); this.Region = new Region(myPath); }
myPath.AddEllipse(20, 30, 1000, 1000);后面的4个参数分别表示运行开始的时候 圆型窗体所展示出的原本窗体的位置(因为原本窗体大于圆形窗体 相当于圆形窗体在原本窗体的 top left)和窗体的 Width 和 Height
写完之后直接运行就OK了