画矩形也可以啊。
Graphics graphics = this.CreateGraphics();
graphics.Clear(Color.White);
SolidBrush greenBrush = new SolidBrush(Color.Green);
PointF point1 = new PointF(100.0f, 100.0f);
PointF point2 = new PointF(200.0f, 50.0f);
PointF point3 = new PointF(250.0f, 200.0f);
PointF point4 = new PointF(50.0f, 150.0f);
PointF point5 = new PointF(100.0f, 100.0f);
PointF[] points = new PointF[] { point1, point2, point3, point4 };
graphics.FillClosedCurve(greenBrush, points, FillMode.Alternate, 1.0f);
PointF[] poly = new PointF[] { point1, point2, point3, point4, point5 };
graphics.TranslateTransform(300, 0);
graphics.FillPolygon(greenBrush, poly, FillMode.Alternate);
这里二个多边型的代码,你可以自己更改坐标后就可以画成矩形 了。