C# 制作圆角label

 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);
        }

已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页