|
-
Oct 8th, 2000, 09:15 PM
#1
Thread Starter
Junior Member
i would like to be able to draw a stright line inside a picture box, like in MS paint. I have the code to draw the lines, but i can't figure out how to erase the line if the mouse moves. If you don't know what i mean, open up paint and select the straight line tool. I would like to be able to code something just like that. Here's the code i have so far:
Option Explicit
Private Sub picDraw_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
picDraw.CurrentX = X
picDraw.CurrentY = Y
End Sub
Private Sub picDraw_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
picDraw.Line (X, Y)-(picDraw.CurrentX, picDraw.CurrentY), RGB(255, 0, 0)
End If
End Sub
can anyone help me?
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
|