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 |