Detecting Mouse Movement

munkee

Active member
Joined
Feb 20, 2007
Messages
43
Programming Experience
Beginner
Alright,
I've got this:

VB.NET:
    Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
        LocalMousePosition = Me.PointToClient(System.Windows.Forms.Cursor.Position)
        TextBox1.Text = ("X=" & LocalMousePosition.X & "," & "Y= " & LocalMousePosition.Y)
    End Sub

and it works fine... What I'm trying to do now is instead of it detecting movements within the form, I'd like it to detect ANYWHERE on the screen, no matter what I'm hovering over.

Anything helps!


Thanks :eek:
 
Cursor.Position already is anywhere on screen. If you want to know it all the time you can put it in a Timer.
 
Back
Top