Drawing Lines and Shapes on a Form
See Also
You can use the line control Select each tool in the Toolbox .
To draw a line a form
1. In the Toolbox, select the line control.
When the pointer moves onto the form, it changes to a cross hair .
2. Click the form where you want the line to begin and hold down the mouse button.
3. Drag the cross hair to where you want the line to end and release the mouse button.
4. From the Properties window , select the BorderStyle property if you want to change the appearance of the line.
5. In the Settings box , select the style you want.
6. Click the Enter button to accept the setting.
To draw a shape on a form
1. In the Toolbox, select the shape control.
When the pointer moves onto the form, it changes to a cross hair .
2. Click and drag the cross hair to make the item the size you want.
3. From the Properties window , select the Shape property.
4. In the Settings box , select the style you want.
5. Click the Enter button to accept the setting.
Note To add color, set the BackColor property to the color you want.
To draw lines, rectangles, and filled-in boxes at run time, use the Line
To draw circles, ellipses, and arcs at run time, use the Circle
Help:
Displaying a Graphic on a Form
Picture Box Control
Setting Form and Control Properties
Learning Visual Basic:
Using Color and Graphics
Programmer's Guide:
Chapter 15, "Creating Graphics for Applications"