我正在尝试制作一个看起来像这样的自定义图片框 -
使用此代码 -
protected void UpdateRegion()
{
var path = new GraphicsPath();
Point[] points =
{
new Point( 0, 0),
new Point(0, ClientSize.Height-80),
new Point(80 , ClientSize.Height),
new Point(ClientSize.Width-80, ClientSize.Height),
new Point(ClientSize.Width, ClientSize.Height-80),
new Point(ClientSize.Width , 0)
};
path.AddPolygon(points);
path.FillMode = FillMode.Winding;
this.Region = new Region(path);
}