【发布时间】:2015-11-07 22:48:07
【问题描述】:
我正在尝试制作一个看起来像这样的自定义图片框 -
使用此代码 -
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);
}
【问题讨论】:
-
你需要添加一个圆弧。
-
@TaW ,我该如何使用它?
-
查看我的答案以获取示例。我也稍微清理了你的代码..
标签: c# picturebox graphicspath