c# 重绘窗体 控件为不规则形状

protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);
            System.Drawing.Drawing2D.GraphicsPath shape = new System.Drawing.Drawing2D.GraphicsPath();
            shape.AddEllipse(0, 0, this.Height, this.Width);
            this.Region = new Region(shape);
        }

 

posted @ 2022-07-27 10:37  devgis  阅读(170)  评论(0编辑  收藏  举报