
move a mouse pointer to a different location without moving the mouse
Hi again! I just replied to your message about creating delays. You can set
cursor position with an API function called...well SetCursorPos !!
You just need to pass the coordinates of the new location. Declare this
function in the Declarations section of the General object in a form or
module and then you will be able to use it. (You can get the declaration
from the API text viewer).
Declare Function SetCursorPos Lib "user32" Alias "SetCursorPos" (ByVal x As
Long, ByVal y As Long) As Long
Here's an example code for using the function:
Dim rNewX as long, rNewY as long
rNewX = 12 'new X coordinate
rNewY = 50 'new Y coordinate
SetCursorPos(rNewX, rNewY)
Hope that helps, feel free to ask more whenever you wish. Bye!
----------------------------------------------------------------------------
--------
Is there anybody out there?
----------------------------
Oscar A. Ross Gurrola
Este Lauder Cosmticos de Mxico
Departamento de Sistemas
----------------------------
Please remove "nospam" from e-mail address to reply.
Por favor, remover "nospam" de la direccin de correo para contestar.
----------------------------------------------------------------------------
--------
ICQ: 21657696
AIM: Oaross
Quote:
>hi!
>i would like to know how to move a mouse pointer to a position on the
screen
>and then click the mouse ,
>without actually moving the mouse physically
>thanks in advance .
>lior