728x90

















GetWindowRect API 바탕화면의 해상도를 구할수있는 API이다.

Private Declare Function GetDesktopWindow Lib "user32.dll" () As Long
Private Declare Function GetWindowRect Lib "user32.dll" (ByVal hwnd As Long, ByRef lpRect As RECT) As Long
Private Type RECT
    Left As Long
    Top As Long
    Right As Long
    Bottom As Long
End Type

Private Sub Form_Load()
Dim De As RECT
GetWindowRect GetDesktopWindow, De
MsgBox De.Right & " x " & De.Bottom
End Sub

예제파일없음

+ Recent posts