briprogram
MIS
Just an amateur programmer here.
Trying to on mousemove event to draw a picture with the mouse. Nothing fancy. See where the question marks are in the code? That is where I need to draw in the picBox.
[Private Sub picBox_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles picBox.MouseDown
paintHere = True
End Sub
Private Sub picBox_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles picBox.MouseMove
If paintHere Then
Dim g As Graphics
g = picBox.CreateGraphics
??????????????????????????????????????
End If
End Sub
Private Sub picBox_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles picBox.MouseUp
paintHere = False
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
picBox.Image = Nothing
End Sub]
--------------------------
Thanks
Brian
Trying to on mousemove event to draw a picture with the mouse. Nothing fancy. See where the question marks are in the code? That is where I need to draw in the picBox.
[Private Sub picBox_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles picBox.MouseDown
paintHere = True
End Sub
Private Sub picBox_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles picBox.MouseMove
If paintHere Then
Dim g As Graphics
g = picBox.CreateGraphics
??????????????????????????????????????
End If
End Sub
Private Sub picBox_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles picBox.MouseUp
paintHere = False
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
picBox.Image = Nothing
End Sub]
--------------------------
Thanks
Brian