VB6如何获得鼠标位置?

2024年11月30日 15:37
有1个网友回答
网友(1):

Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Type POINTAPI
x As Long
y As Long
End Type
Dim p As POINTAPI
GetCursorPos p
Me.Caption = "鼠标坐标:" & p.x & "," & p.y