|
-
Oct 9th, 2000, 08:47 PM
#1
Thread Starter
Junior Member
i need some help. What i would like to do is create a drawing tool just like the straight line tool in paint. I have the code to draw the line and erase it everytime the mouse moves, and when the button is released the line is erased. Here is the code i have:
Option Explicit
Public A As Integer, B As Integer
Private Sub picDraw_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
A = X
B = Y
End Sub
Private Sub picDraw_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
picDraw.Cls
If Button = 1 Then
picDraw.Line (X, Y)-(A, B), RGB(255, 0, 0)
End If
End Sub
can someone tell me how to keep from erasing the line when the button is released?
i know it probably has something to do with the MouseUp function
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
|