private void DrawRoundRect(Label label)
{
float X = (float)(label.Width);
float Y = (float)(label.Height);
PointF[] points =
{
new PointF(2,0),
new PointF(X-2,0),
new PointF(X,2),
new PointF(X,Y-2),
new PointF(X-2,Y),
new PointF(2,Y),
new PointF(0,Y-2),
new PointF(0,2),
};
GraphicsPath path = new GraphicsPath();
path.AddLines(points);
label.Region = new Region(path);
}
C# 制作圆角label
最新推荐文章于 2024-03-04 16:36:28 发布