How to change the system colors programatically

  • Thread starter Thread starter Schuntermann Joerg \(IFAT IT MFG COC MES MAC\)
  • Start date Start date
S

Schuntermann Joerg \(IFAT IT MFG COC MES MAC\)

This sounds like a trivial task: I'd like to change the default color
settings for certain system elements (e.g. Control, Meu, Window) inside a C#
program programatically during program initialization. All UI controls which
have one of their color property set to one of these settings (e.g.
button1.BackColor = System.Drawing.SystemColors.Control) shall be reendered
according to the customized control color.

These settings shall be valid for all threads in the application, all UI
appropriate UI elements, and all dynamically loaded assemblies.

Changing the registry will not do the job because the settings shall only be
valid in the application context. And changing each individual control seems
to be too cumbersome.

Any help is highly appreciated!
 
Schuntermann,

You will have to change each element to do this. The reason is that
these settings are system-wide, and can not be changed on an
application-by-application basis (even through the API). You will have to
custom paint each UI element.

Hope this helps.
 
Back
Top