#7167 Author: archita Member Level: Silver Member Rank: 71 Date: 24/Oct/2011 Rating:  Points: 4 |
In .Net Graphics class is provides methods to draw objects on to the display device including forms. This class belongs to System.Drawing namespace. This class cannot be inherited and encapsulates GDI + drawing surface. using following piece of code you can draw a diagonal line. private void Form1_Load(object sender, EventArgs e) { Graphics board = this.CreateGraphics(); Pen p = new Pen(Color.Black, 2.5f); board.DrawLine(p, 100,150, 100, 100); }
|