
Help: Determining system color mode...
Try GetDeviceCaps!
Option Explicit
Private Declare Function CreateIC Lib "gdi32" Alias "CreateICA" (ByVal
lpDriverName As String, ByVal lpDeviceName As String, ByVal lpOutput As
String, ByVal lpInitData As Long) As Long
Private Declare Function DeleteDC Lib "gdi32" (ByVal hdc As Long) As Long
Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, ByVal
nIndex As Long) As Long
Private Const BITSPIXEL = 12
Private Sub Form_Click()
Dim lDC As Long
lDC = CreateIC("DISPLAY", vbNullString, vbNullString, ByVal 0&)
Debug.Print "Color Bits "; GetDeviceCaps(lDC, BITSPIXEL)
Call DeleteDC(lDC)
End Sub
Quote:
>Is there an API call that you can use to return which color mode windows is
>currently using? For example, how to determine if your machine is using 256
>colors, 16 bit color, 24 bit color, 32 bit color, etc?
>Any help would be greatly appreciated.
>Thanks in advance,
>Trev