|
-
Sep 19th, 2001, 01:34 PM
#6
Frenzied Member
ok......
use 2 pictureboxes
set picture1 and picture2's autoredraw to true
set picture2's visible to false
insert code:
Dim X1 As Long, Y1 As Long
Dim DrawNow As Boolean
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
DrawNow = True
X1 = X
Y1 = Y
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If DrawNow = True Then
Picture1.Cls
Picture1.Line (X1, Y1)-(X, Y)
End If
End Sub
Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
DrawNow = False
Picture2.Picture = Picture1.Image
Picture1.Picture = Picture2.Picture
End Sub
Last edited by cyborg; Sep 20th, 2001 at 08:58 AM.
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
|