110,566
社区成员
发帖
与我相关
我的任务
分享
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
using (GraphicsPath path = new GraphicsPath())
{
int r = 32;//圆角半径
path.AddArc(0, 0, r, r, 180, 90);
path.AddArc(this.Width - r - 1, 0, r, r, 270, 90);
path.AddArc(this.Width - r - 1, this.Height - r - 1, r, r, 0, 90);
path.AddArc(0, this.Height - r - 1, r, r, 90, 90);
this.Region = new Region(path);
}
}
}