applying a theme color to a control

A

AussieRules

Hi,

In XP you can set color schemes (olive green, silver, default blue).

I have some controls(panels) on my form, and I would like to set the color
as per the color of the scheme.

Can this be done ?
 
A

_Andy_

Hi,

In XP you can set color schemes (olive green, silver, default blue).

I have some controls(panels) on my form, and I would like to set the color
as per the color of the scheme.

Can this be done ?

You should have access automatically if you use the
System.Drawing.SystemBrushes and System.Drawing.SystemColors
enumerations instead of hard-coded colours.
 
T

Tom Spink

Hi, using the SystemColors class you can get the colors that are assigned to
certain system components, eg

SystemColors.Control gets the color assigned to controls, e.g. buttons and
whatnot.
SystemColors.Highlight gets the color assigned to highlighting.

There's also a SystemBrushes and SystemPens class, that lets you get the
appropriate object associated with the color.

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit

" System.Reflection Master "

==== Converting to 2002 ====
Remove inline declarations
 
H

Herfried K. Wagner [MVP]

* "AussieRules said:
In XP you can set color schemes (olive green, silver, default blue).

I have some controls(panels) on my form, and I would like to set the color
as per the color of the scheme.

You will have to use pinvoke on 'GetThemeColor'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top