|
-
Dec 16th, 2000, 12:15 PM
#1
Thread Starter
Lively Member
I want to write a really simple program or so I think. All I want to do is draw a line wherever the mouse moves, like clicking and holding in paint and just moving the mouse around.(Without clicking just moving the mouse) I then want to be able to clear the form by a simple click. Any ideas? And Possibly add some color changes in there too?
Thanks
-
Dec 17th, 2000, 01:18 PM
#2
transcendental analytic
Paste this sample code to a form 
Code:
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
CurrentX = X
CurrentY = Y
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Select Case Button
Case 1 'left button draws lines
Line -(X, Y)
Case 2 'right button changes color
ForeColor = QBColor(Int(Rnd * 16))
Case 3 'both buttons clear the form
Cls
End Select
End Sub
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Dec 19th, 2000, 10:54 PM
#3
Thread Starter
Lively Member
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
|