Dheeraj
Joined: 27 Aug 2007 Posts: 108
|
Posted: Thu Jan 28, 2010 11:09 am Post subject: |
|
|
Hi rahul,
Inorder to draw poligon in Windows application you can use DrawPolygon() method. Please take one button control & develop below code under buttonClick event.
private void button1_Click(object sender, EventArgs e)
{
Point[] p1 = new Point[4];
p1[0] = new Point(0, 45);
p1[1] = new Point(45, 90);
p1[2] = new Point(90, 135);
p1[3] = new Point(135, 200);
Graphics G = this.CreateGraphics();
G.DrawPolygon(Pens.Red, p1);
}
Here we can adjust the values for co-ordinates according to our requirement.
Thank you... |
|