Hi,
I have a winform and am trying to just draw a triangle on it. I don't want it inside of an event.
Currently, the code I have is just this
Nothing draws. I've added an invalidate to the end incase that was the hitch, but still, nada.
Could any kind soul please point the way on this? Line and filled polygons are something I've never needed to play with - until now...
Thanks
Paul
I have a winform and am trying to just draw a triangle on it. I don't want it inside of an event.
Currently, the code I have is just this
Code:
public partial class Triangles : Form
{
public Triangles()
{
InitializeComponent();
drawTriangle();
}
private void drawTriangle()
{
Graphics surface;
surface = this.CreateGraphics();
SolidBrush brush = new SolidBrush(Color.Blue);
Point[] points = {new Point(10, 10), new Point(100, 10), new Point(50, 100) };
surface.FillPolygon(brush, points);
}
}
Could any kind soul please point the way on this? Line and filled polygons are something I've never needed to play with - until now...
Thanks
Paul
Comment