推 badsan:謝謝大大...我試看看^^ 11/21 09:27
以下是可以抓滑鼠位置的程式.邊框部份請自己找API
Option Explicit
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Type POINTAPI
x As Long
y As Long
End Type
Private Sub Timer1_Timer()
Dim xy As POINTAPI
GetCursorPos xy
xy.x = xy.x - Me.Left / Screen.TwipsPerPixelX
xy.y = xy.y - Me.Top / Screen.TwipsPerPixelY
Label1.Caption = CStr(xy.x) & " : " & CStr(xy.y)
End Sub
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 202.145.53.109