Hey, I've been lurking on this forum for a while but only needed to post today. For my program I need to be able to get the mouse co-ordinates in order to make labels draggable. I am currently using this code:
Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove
Label1.Text = "X." & e.X & vbCrLf & "Y." & e.Y
End Sub
which works, but not when the mouse is over a button, image etc, it only works when it's over the actual form. Is there a way to make it get the mouse position at any point?
Thanks a lot for any help!
Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove
Label1.Text = "X." & e.X & vbCrLf & "Y." & e.Y
End Sub
which works, but not when the mouse is over a button, image etc, it only works when it's over the actual form. Is there a way to make it get the mouse position at any point?
Thanks a lot for any help!