Move the mouse cursorTag(s): WinAPI/Registry


[structure definition for GetCursorPos function, str_point]
posx  long
posy  long

[local external function declaration]
FUNCTION boolean SetCursorPos(int cx, int cy)  LIBRARY "User32.dll"
FUNCTION boolean GetCursorPos(ref str_point POINT)  LIBRARY "User32.dll"

[clicked event of a button]
int i
str_point lstr_point

GetCursorPos(lstr_point)
FOR i = 0 TO 100
  SetCursorPos(lstr_point.posx + i , lstr_point.posy + i)
NEXT

blog comments powered by Disqus