|
-
Oct 7th, 2000, 08:49 PM
#1
Thread Starter
Junior Member
i am trying to learn how to make a small paint program and would like to know how to draw lines in a picture box. I know how to draw lines on the form, just not the picture box
-
Oct 7th, 2000, 09:33 PM
#2
Addicted Member
hum....
try whit the Get/Set pixel..
I can't help you because I dont know how to use it ..
But I sure that you can whit thoses commands. .
-
Oct 7th, 2000, 10:13 PM
#3
Lively Member
You can use the same function that used on a form:
Picture1.Line (x1, y1)-(x2, y2), RGB(200, 10, 10)
is that what you want?
Yesterday is history ... Tomorrow is mistry .. Today is a gift.
VB6 , intermidiat
-
Oct 7th, 2000, 11:53 PM
#4
Try this:
Code:
Public A, B As Integer
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then Picture1.Line (A, B)-(X, Y)
A = X: B = Y
End Sub
Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then Picture1.Line (X, Y)-(X + 15, Y + 15)
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
|