如题,谢谢

解决方案 »

  1.   

    Public Declare Function GetWindowRect Lib "user32" Alias "GetWindowRect" (ByVal hwnd As Long, lpRect As RECT) As Long
    Public Type RECT
            Left As Long
            Top As Long
            Right As Long
            Bottom As Long
    End Typedim r   as rectGetWindowRect Me.hWnd , rDebug.Print r.Left , r.Top
      

  2.   

    Me.Left, Me.Top, Me.Width, Me.Height
    如果要转换为 Pixel 单位分别除以 Screen.TwipsPerPixelX、Screen.TwipsPerPixelY
      

  3.   

    窗体里加个定时器然后:Option ExplicitPrivate Sub Timer1_Timer()
        Me.Caption = Me.Top \ 15 & ":" & Me.Left \ 15
    End Sub