
Determine Color Mode (16, 256, 16k) of Windows
Hi richie
R = GetDeviceCaps(hDC, BITSPIXEL)
R will be the color depth, i.e. nColors = 2^R. For instance, for 256 colors
you will get R = 8.
Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hDC As Long, ByVal
nIndex As Long) As Long
Private Const BITSPIXEL = 12
regards,
Niels
Quote:
>How can I determine how many colors the current graphics mode is running
>from VB 4.0? (ie. 16, 256 colors)
>- Rich