How to draw a line in c sharp windows application
how to draw a line
when you want to draw a line in a form you right following code in your windows c sharp application
So we start to drawing a line in windows form ...
You right following code in the form click event to draw a line .
Graphics s=this.creategraphic();
Pen p=new Pen(Color.Brown,5.0f);
s.DrawLine(p,10,10,200,200);
So friend here graphics and pen is a class of drawing namespace . And creategraphic is a method of a graphic class color is a class to help of color class you can choose a System Define color .and 5.of is a width of line you can customize the width of line and Drawline is a another method of graphics in the Drawline method you define the size of line .....
No comments: