Bildschirmauflösung ermitteln

GetDeviceCaps, ReleaseDC, GetDC
Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, ByVal nIndex As Long) As Long
Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal hdc As Long) As Long
Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Const HORZRES = 8
Const VERTRES = 10
Function ScreenResolution() Function in Modul einbinden.
Dim lRval As Long
Dim lDc As Long
Dim lHSize As Long
Dim lVSize As Long
 lDc = GetDC(0&)
 lHSize = GetDeviceCaps(lDc, HORZRES)
 lVSize = GetDeviceCaps(lDc, VERTRES)
 lRval = ReleaseDC(0, lDc)
 ScreenResolution = lHSize & "x" & lVSize
End Function
Private Sub Command1_Click() Programm mit CommandButton starten.
 MsgBox ScreenResolution()
End Sub



 Ranking-Hits zurück Sitemap
Designed by www.wbrnet.info