VB6如何获得鼠标位置?

2024-11-30 15:37:43
推荐回答(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