04-25-2011, 08:28 PM
This is not the best way to do it.. but for the sake of simplicity I think this will work for you. Adjust the code accordingly to fit your needs
Code:
Public Class Form1
Dim mDown As Boolean = False
Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown
mDown = True
End Sub
Private Sub PictureBox1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseUp
mDown = False
End Sub
Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove
If mDown Then
Me.Text = "down"
Else
Me.Text = "up"
End If
End Sub
End Class
I code at http://tech.reboot.pro