https://msdn.microsoft.com/zh-cn/library/f152hbx4(v=vs.110).aspx
此示例向窗体提供随该窗体一起调整大小的椭圆形状。
protected override void OnPaint(System.Windows.Forms.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);
}
自适应椭圆窗体绘制

本文介绍了一个使用C#实现的自适应椭圆窗体绘制示例。该示例通过GraphicsPath和Region对象使椭圆能够随着窗体的大小变化而自动调整其尺寸。
1万+

被折叠的 条评论
为什么被折叠?



