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了

相关文章:

  • 2021-09-25
  • 2021-09-02
  • 2022-01-08
  • 2022-12-23
  • 2022-12-23
  • 2021-12-18
  • 2021-11-30
  • 2022-12-23
猜你喜欢
  • 2022-02-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案