MoveMouseControl




Type POINTAPI
x As Integer
Y As Integer
End Type

Declare Sub SetCursorPos Lib "User" (ByVal X As Integer, ByVal Y As Integer)
Declare Sub ClientToScreen Lib "User" (Byval hWnd As Integer, lpPoint As POINTAPI)

'Utilizzo: Il codice seguente mette il cursore al centro di un

'pulsante (command1) disegnato sul Form1


Dim Cur as POINTAPI
Dim Smode As Integer

Smode = ScaleMode
Cur.x = Command1.Left + (Command1.Width \ 2)
Cur.y = Command1.Top + (Command1.Height \ 2)

ClientToScreen Form1.hWnd, Cur
SetCursorPos Cur.x , Cur.y
ScaleMode = Smode










( movemousecontrol.html )- by Paolo Puglisi - Modifica del 17/12/2023