Expand|Select|Wrap|Line Numbers
- Private Declare Function GetDeviceCaps Lib "GDI32" (ByVal hDC As Long, ByVal nIndex As Long) As Long
- Function DeviceColors(hDC As Long) As Single
- Const PLANES = 14
- Const BITSPIXEL = 12
- DeviceColors = 2 ^ (GetDeviceCaps(hDC, PLANES) * GetDeviceCaps(hDC, BITSPIXEL))
- End Function
Some typical values returned...
4,294,967,296 = "True Color" (32 bit)
65,536 = "High Color" (16 bit)