在想要更改的控件Paint事件中添加事件方法 矩形--------->椭圆 代码: private void Form1_Paint(object sender, PaintEventArgs e) { System.Drawing.Drawing2D.GraphicsPath shape = new System.Drawing.Drawing2D.GraphicsPath(); shape.AddEllipse(0, 0, this.Width, this.Height); this.Region = new System.Drawing.Region(shape);//this.region的范围就表示原Form的范围 } |
|