How to determine how many colors the system has been set to 
Author Message
 How to determine how many colors the system has been set to

I need to be able to determine if a system is running in 256 or greater.
Can anyone help?

Simon Parsons
---------------------------------------------------------------



Sat, 03 Feb 2001 03:00:00 GMT  
 How to determine how many colors the system has been set to
Here is a snipit I took out of my program. It calls the GetDeviceCaps API
function which you have to get out of your WINAPI program that came with
Visual Basic. You also need the BITSPIXEL type to do this which is in the
WINAPI also.

Dim r as long
r = GetDeviceCaps(hdc, BITSPIXEL)
  If 2 ^ r < 256 Then
      msgbox "You must have 256 colors to run this program!"
        end
  End If

If you have any problems feel free to reply to this newsgroup or e-mail me.

Thank You
Farshad Hemmati
President of CompuCated Technologies Inc.


Quote:
>I need to be able to determine if a system is running in 256 or greater.
>Can anyone help?

>Simon Parsons
>---------------------------------------------------------------




Sat, 03 Feb 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Determining system color setting

2. Determining system color setting

3. Determining current system color setting

4. Determine system color depth?

5. Help: Determining system color mode...

6. setting all foreground and bkground colors to use window's current color setting

7. How to set/retrieve Windows System Colors Using API and VBA

8. Setting a control's backcolor to a system color in code

9. Setting System colors from VB application

10. How can I set system colors ?

11. Setting each application with different system colors

12. How to check current system Color Palette setting?

 

 
Powered by phpBB® Forum Software