Título: Manual Como hacer para mover el mouse y hacer click en vb Publicado por: gmf_321 en 24 Septiembre 2006, 16:31 pm Para cambiar de posicion el mouse van a usar la siguiente api:
Código: Public Declare Function SetCursorPos Lib "user32.dll" (ByVal x As Long, ByVal y As Long) As Long Para hacer click con el mouse van a usar la siguiente api:Código: Public Declare Sub mouse_event Lib "user32.dll" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy _ Constantes del mouse_eventAs Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long) Código: Const MOUSEEVENTF_ABSOLUTE = &H8000 Const MOUSEEVENTF_LEFTDOWN = &H2 Const MOUSEEVENTF_LEFTUP = &H4 Const MOUSEEVENTF_MIDDLEDOWN = &H20 Const MOUSEEVENTF_MIDDLEUP = &H40 Const MOUSEEVENTF_MOVE = &H1 Const MOUSEEVENTF_RIGHTDOWN = &H8 Const MOUSEEVENTF_RIGHTUP = &H10 Const MOUSEEVENTF_WHEEL = &H80 Const MOUSEEVENTF_XDOWN = &H100 Const MOUSEEVENTF_XUP = &H200 Const WHEEL_DELTA = 120 Const XBUTTON1 = &H1 Const XBUTTON2 = &H2 Para hacer click pone este code (boton izquierdo del mouse): Código: mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0 Despues para mover el mouse :mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 Código: SetCursorPos("x", "y") Saludos FMG ...... Título: Re: Manual Como hacer para mover el mouse y hacer click en vb Publicado por: Dahmer en 24 Septiembre 2006, 17:41 pm tendria q ir en el de vb ;D ;D
Saludos |