Private Const BITSPIXEL = 12
Private Const LOGPIXELSX = 88
Private Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal hDC As Long) As Long
Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetDeviceCaps Lib "Gdi32" (ByVal hDC As Long, ByVal Index As Long) As Long
Sub Main()
Dim hDC As Long
hDC = GetDC(0)
ColourDepth = GetDeviceCaps(hDC, BITSPIXEL)
Call ReleaseDC(0, hDC)
End Sub
|