Winform窗体缺少左上角效果:

 public void SetWindowRegion()
        {
            System.Drawing.Drawing2D.GraphicsPath FormPath;
            FormPath = new System.Drawing.Drawing2D.GraphicsPath();
            Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
            int diameter = 20;
            FormPath .AddRectangle(new Rectangle(rect.Location.X + diameter, rect.Location.Y, rect.Width - diameter, rect.Height));
            FormPath .AddRectangle(new Rectangle(rect.Location.X, rect.Location.Y + diameter, diameter, rect.Height - diameter));
                        path.CloseFigure();

            this.Region = new Region(FormPath);

        }

        protected override void OnResize(System.EventArgs e)
        {

            this.Region = null;

            SetWindowRegion();

        }        
View Code

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2021-11-11
  • 2022-12-23
  • 2021-12-30
猜你喜欢
  • 2022-02-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案