-
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
-
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
-