Determining current system color setting 
Author Message
 Determining current system color setting

Hi all,

I need to know how to determine the current system color setting (e.g.,
256, 65K, High Color, True Color, etc.) and change it if necessary.  This
needs to work for Windows 3.x and 95/NT; I'm using VB3.0 Pro.  I have the
MS SDK (books, CD's, etc.) but can't seem to find what I'm looking for.
I'd appreciate it if someone could point me in the right direction.

Thanks in advance,

Mike



Mon, 28 Jun 1999 03:00:00 GMT  
 Determining current system color setting

I've add liminted success with the following code.  Win95 is fine, but
Win3.x causes all kinds of problems (graphics tend to start appearing at
location 0,0 of the screen!).  I haven't worked out the latter, but if you
get a better solution or fix this one, please let me know!

    Const PLANES = 14
    Const BITSPIXEL = 12
    hDC = GetWindowDC(hWndSrc) ' Get device context for entire window
    ScreenColorDepth = GetDeviceCaps(hDC, PLANES) * 2 ^ GetDeviceCaps(hDC,
BITSPIXEL)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dave Diehl
Full Service Networking, Cincinnati, OH

"...no job is too big, no fee is too big..."
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Fri, 02 Jul 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

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

2. How to check current system Color Palette setting?

3. Determining system color setting

4. How to determine how many colors the system has been set to

5. Determining system color setting

6. Determine current windows graphics settings

7. Determine system color depth?

8. Help: Determining system color mode...

9. How do I know locale setting of Time and Date of current system

10. How to Determine System Settings from VBA

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

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

 

 
Powered by phpBB® Forum Software