How can I set system colors ? 
Author Message
 How can I set system colors ?

Hi,

I'm working with VB4 on NT4.0 and I would like to present our users with a
reduced set of system colors (the users do not have access to the control
panel).

Does anyone know how to retrieve the color sets and how to apply one of them ?

Thanks,

Olivier



Sun, 21 Feb 1999 03:00:00 GMT  
 How can I set system colors ?

From Win32 SDK:

The GetSysColor function retrieves the current color of the specified
display element. Display elements are the parts of a window and the Windows
display that appear on the system display screen.
DWORD GetSysColor(
    int nIndex  // display element
   );  

Steve.



Quote:
> Does anyone know how to retrieve the color sets and how to apply one of

them ?


Sun, 21 Feb 1999 03:00:00 GMT  
 How can I set system colors ?

Quote:

> Hi,

> I'm working with VB4 on NT4.0 and I would like to present our users with a
> reduced set of system colors (the users do not have access to the control
> panel).

> Does anyone know how to retrieve the color sets and how to apply one of them ?

> Thanks,

> Olivier

use API call SetSystemPalette to change system's 20 reserved color,
however this is not recommended!
--
---------||-----------||--------------------------
         .---~~       ~~--.    Always take a
        .    -        -    .      Bright Look
        .    o        o    .        
--------------------------------------------------


Sun, 21 Feb 1999 03:00:00 GMT  
 How can I set system colors ?

Quote:

> Hi,

> I'm working with VB4 on NT4.0 and I would like to present our users with a
> reduced set of system colors (the users do not have access to the control
> panel).

> Does anyone know how to retrieve the color sets and how to apply one of them ?

> Thanks,

> Olivier

See MS Knowledge Base article:

How to Set Windows System Colors Using API and Visual Basic
Article ID: Q82158

The color schemes are in the control.ini file under [COLOR SCHEMES], you might want
to check into SHELLing to the appropeate control panel applet.  I never tried, it, I
dont know if it is possible (I would guess if there is a will....)

Hope this helps!



Sun, 21 Feb 1999 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

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

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

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

4. Setting System colors from VB application

5. Setting each application with different system colors

6. Determining system color setting

7. How to check current system Color Palette setting?

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

9. Determining system color setting

10. Setting Number of System Colors via API

11. Determining current system color setting

12. Mapping Bitmap Background Colors to System Colors

 

 
Powered by phpBB® Forum Software