RE:mover y hacer click del mouse por codigo
Esto puede ayudarte
Option Explicit
Const MOUSEEVENTF_MOVE = &H1 ' movimiento del mouse
Const MOUSEEVENTF_LEFTDOWN = &H2 ' botón izquierdo presionado
Const MOUSEEVENTF_LEFTUP = &H4 ' botón izquierdo soltado
Const MOUSEEVENTF_RIGHTDOWN = &H8 ' botón derecho presionado
Const MOUSEEVENTF_RIGHTUP = &H10 ' botón derecho soltado
Const MOUSEEVENTF_MIDDLEDOWN = &H20 ' botón central presionado
Const MOUSEEVENTF_MIDDLEUP = &H40 ' botón central soltado
Const MOUSEEVENTF_ABSOLUTE = &H8000 ' movimiento absoluto
Dim Res As Long
Private Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
Private Declare Sub mouse_event Lib "user32" (ByVal dwflags As Long, ByVal dx As Long, ByVal dy As Long, _
ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Function Simular_Pulsacion(x As Long, y As Long)
Res = SetCursorPos(x, y)
mouse_event MOUSEEVENTF_ABSOLUTE Or MOUSEEVENTF_LEFTDOWN, x, y, 0, 0
mouse_event MOUSEEVENTF_ABSOLUTE Or MOUSEEVENTF_LEFTUP, x, y, 0, 0
End Function
Private Sub Command1_Click()
Res = Simular_Pulsacion(Form1.Width, Form1.Height)
End Sub
Con Gusto
Saludos