Making the mouse cursor wrap around the desktop

  • Thread starter Thread starter jwgoerlich
  • Start date Start date
J

jwgoerlich

My goal is to create an app that measures the distance my mouse has
moved, and wraps the mouse around should it reach the edge of the
screen. I have been able to track the mouse around the desktop using
SetWindowsHookEx (thanks Claes Bergefall!). Now what I want to do is
to move the mouse cursor. For instance:

If Cursor.Position.X < 10 Then
Cursor.Position = New Point( _
Screen.PrimaryScreen.Bounds.Width, _
Cursor.Position.X)
End If

The problem is that the Cursor.Position does not seem to work if
called while the mouse is moving.

Any help appreciated,

J Wolfgang Goerlich
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top