Paints into a picture box like on paint!
Paints into a picture box like on paint!
API Declarations
'set pic.autoredraw to true
'set pic.drawwidth to 2
Rate Paints into a picture box like on paint!
(1(1 Vote))
Private Sub Form_Load()
down = False 'mouseButton is down
End Sub
Private Sub pic_DblClick()
pic.Cls 'Clears the picture
End Sub
Private Sub pic_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
down = True 'The mouse button is down so down = true
pic.PSet (X, Y) 'Draws a pixel where clicked
End Sub
Private Sub pic_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If down = True Then pic.Line -(X, Y) 'Draws a line from the last place to the next
'NOTE: Use line in mouseMove and not pset, as pset will give
' you losts of dots where as line will not!
End Sub
Private Sub pic_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
down = False 'MouseButtons is lifted
End Sub
Paints into a picture box like on paint! Comments
No comments yet — be the first to post one!
Post a Comment