Determining color depth? 
Author Message
 Determining color depth?

Hi

How do I determine the color depth of the PC. I want to run a
different procedure if only 256 colors are being displayed.

thanks

Paul Chapelhow

Walker Interactive


(remove _nospam for e-mail address)



Tue, 31 Oct 2000 03:00:00 GMT  
 Determining color depth?

Const BITSPIXEL& = 12
Declare Function GetDeviceCaps Lib "gdi32" (ByVal hDC As Long, ByVal nIndex
As Long) As Long

------------------------------
Dim R&
R = GetDeviceCaps(hDC, BITSPIXEL)

Just pass in the hDC of some window or picture box, and the function will
return the current colordepth, e.g. 8 if 256 colors or 24 if true colors.

Niels

Quote:

>Hi

>How do I determine the color depth of the PC. I want to run a
>different procedure if only 256 colors are being displayed.

>thanks

>Paul Chapelhow

>Walker Interactive


>(remove _nospam for e-mail address)



Tue, 31 Oct 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Determine color depth

2. How to Determine Color Depth?

3. How to Determine Color Depth?

4. Determining color depth?

5. How to Determine Color Depth?

6. How to Determine Color Depth?

7. How do I determine the display color depth?

8. Determining Color Pallette Depth

9. Determine system color depth?

10. Determining Color Pallette Depth

11. Determining Color Pallette Depth

12. determining display color depth in VB4?

 

 
Powered by phpBB® Forum Software