i have this in the form constructor:
which creates a poligonal form.
i want to have the upper part colored, and im using the same coordinates, like:
but the colored part doesnt match the part of the window i want! do i have to make coordinates shift or something? i tried rectangletoscreen etc but nothing worked ...
Code:
GraphicsPath p = new GraphicsPath();
Point[] points = { new Point(0, 0), new Point(100, 0),
new Point(150, 50), new Point(250, 50),
new Point(250, 350), new Point(0, 350) };
p.AddPolygon(points);
this.Region = new Region(p);
which creates a poligonal form.
i want to have the upper part colored, and im using the same coordinates, like:
Code:
Graphics g = e.Graphics;
Point[] points = { new Point(0, 0), new Point(100, 0),
new Point(150, 50), new Point(0, 50)};
Rectangle r = new Rectangle(points);
g.FillRectangle(new SolidBrush(Color.Aqua), r);
but the colored part doesnt match the part of the window i want! do i have to make coordinates shift or something? i tried rectangletoscreen etc but nothing worked ...