Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long Private Type POINTAPI x As Integer y As Integer End Type Private Sub Command1_Click() Timer1.Enabled = Not Timer1.Enabled End Sub Private Sub Timer1_Timer() Dim pos As POINTAPI GetCursorPos pos Label1.Caption = pos.x Label2.Caption = pos.y End Sub 为什么y坐标总为0,x是正确的~ 谢谢~~~