CodeItBetter Programming Another VB Programming Blog

How to draw a horizontal and vertical line in a picture box?

Posted on January 4, 2009
1
2
3
4
5
6
7
8
9
10
11
'Controls - How to draw a horizontal and vertical line in a picture box?
'Insert a picture box and a command button on your form

Private Sub Command1_Click()
    Picture1.ScaleTop = -1   ' Set scale for top of grid.
    Picture1.ScaleLeft = -1   ' Set scale for left of grid.
    Picture1.ScaleWidth = 2   ' Set scale (-1 to 1).
    Picture1.ScaleHeight = 2
    Picture1.Line (-1, 0)-(1, 0)   ' Draw horizontal line.
    Picture1.Line (0, -1)-(0, 1)   ' Draw vertical line.
End Sub
Filed under: Controls Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.