How can i draw these lines in a picture box?
Printable View
How can i draw these lines in a picture box?
hi eimroda :)
you can do something like this
VB Code:
Private Sub Form_Load() Dim i As Integer Dim iHeight As Integer iHeight = 500 Picture1.BackColor = vbWhite Picture1.AutoRedraw = True For i = 0 To 4 Picture1.Line (0, iHeight * i)-(Picture1.ScaleWidth, iHeight + (iHeight * i)), vbBlack, B Next i End Sub
thnx peet! How about the vertical lines?
They are there but too close to the edge of the picturebox. :)
try this
VB Code:
Private Sub Form_Load() Dim i As Integer Dim iHeight As Integer iHeight = 500 Picture1.BackColor = vbWhite Picture1.AutoRedraw = True For i = 0 To 4 Picture1.Line (100, iHeight * i)-(Picture1.ScaleWidth - 100, iHeight + (iHeight * i)), vbBlack, B Next i End Sub