Private Declare Function ClientToScreen Lib "user32" (ByVal hwnd As Long, lpPoint As POINTAPI) As Long
Private Type POINTAPI
X As Long
Y As Long
End Type
Private Sub Timer1_Timer()
Dim Points As POINTAPI
ClientToScreen Me.hwnd, Points
Label1.Caption = "当前窗口的坐标值为: " & Points.X & "," & Points.Y
End Sub