I'm using this function I wrote:

VB Code:
  1. Public Sub MoveMouse(X1 As Long, Y1 As Long, X2 As Long, Y2 As Long)
  2.     'Rectangle
  3.     Dim mmRECT As RECT
  4.    
  5.     'Y increment
  6.     Dim XInc As Double
  7.     Dim YInc As Double
  8.     XInc = ((X2 - X1) / 10000)
  9.     YInc = ((Y2 - Y1) / 10000)
  10.    
  11.     'Set mouse cursor to hand
  12.     Screen.MousePointer = vbCustom
  13.     Screen.MouseIcon = LoadResPicture("POINT", vbResCursor)
  14.    
  15.     'Move mouse
  16.     Dim i As Double
  17.     For i = 0 To 10000
  18.         mmRECT.Top = Y1 + (YInc * i)
  19.         mmRECT.Bottom = Y1 + (YInc * i) + 1
  20.         mmRECT.Left = X1 + (XInc * i)
  21.         mmRECT.Right = X1 + (XInc * i) + 1
  22.         ClipCursor mmRECT
  23.         PauseMe 250
  24.     Next
  25.    
  26.     'Set cursor to default
  27.     Screen.MousePointer = vbDefault
  28.    
  29.     'Release mouse
  30.     ClipCursor &H0
  31. End Sub
  32.  
  33.  
  34. 'Pause system in a loop temporarily
  35. Public Sub PauseMe(lngPauseDuration As Long)
  36.     Dim i As Long
  37.     Do Until i = lngPauseDuration
  38.         i = i + 1
  39.         DoEvents
  40.      Loop
  41. End Sub

To force the mouse to move (in a straight line) between two points. The PauseMe function just holds up the processor for a tiny period of time so visual effects can actually be seen (they're too fast otherwise).


Anyway, this function works fine if the points are:
X1 = 0
Y1 = 0
X2 = 12000
Y2 = 12000

(topleft->bottom right)

but in reverse, nothing happens for awhile, and then some time later, the mouse moves as I want it to... it's really quite odd....