Đưa con trỏ đến một vị trí nhất định home Xuất xứ : www.pscode.com Binh khí sử dụng : Một Module, 2 nút án CommandButton Doan ma : Module : Public Type POINTAPI x As Long Y As Long
Trang 1Đưa con trỏ đến một vị trí nhất định home
Xuất xứ : www.pscode.com
Binh khí sử dụng : Một Module, 2 nút án (CommandButton)
Doan ma :
Module :
Public Type POINTAPI
x As Long
Y As Long
End Type
Declare Function ClientToScreen Lib "user32" (ByVal hwnd As Long, lpPoint
As POINTAPI) As Long
Public Declare Function SetCursorPos Lib "user32.dl1l1" (ByVal X As Long,
ByVal Y As Long) As Long
Sub MoveMouse(X As Single, Y As Single)
Dim pt As POINTAPT
pt.xX = xX
pt.Y = Y
ClientToScreen Forml.hwnd, pt
setCursorPos pt.xX, ĐE.Y
End Sub
Form :
Private Sub Form Load()
MoveMouse 500, 400
End Sub