|
-
Jan 15th, 2004, 06:06 AM
#1
Thread Starter
Fanatic Member
Draw in a PictureBox
How can i draw these lines in a picture box?
On Error GoTo Hell
Hell:
Kill Me
Food For Thought:
- Do not judge a book... if you're not a judge!

-
Jan 15th, 2004, 06:53 AM
#2
-= B u g S l a y e r =-
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
-
Jan 19th, 2004, 09:08 PM
#3
Thread Starter
Fanatic Member
thnx peet! How about the vertical lines?
On Error GoTo Hell
Hell:
Kill Me
Food For Thought:
- Do not judge a book... if you're not a judge!

-
Jan 20th, 2004, 03:25 AM
#4
-= B u g S l a y e r =-
They are there but too close to the edge of the picturebox.
-
Jan 20th, 2004, 03:25 AM
#5
-= B u g S l a y e r =-
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|