//设置形状
System.Drawing.Drawing2D.GraphicsPath path = new System.Drawing.Drawing2D.GraphicsPath();
Point[] points = new Point[4];
points[0] = new Point(X0,Y0);
points[1] = new Point(X1,Y1);
points[2] = new Point(X2,Y2);
points[3] = new Point(X3,Y3);
path.AddPolygon(points);
button.Region = new Region(path);
//设置无边框
button.FlatStyle = FlatStyle.Flat;
button.FlatAppearance.BorderSize = 0;
|