Skip to main content

Problem:

How can you access the System Colors in a .Net Application ?

At runtime you may want to determine for example the system color that is used for a Window background or an active caption.

Resolution:

The color class has a FromKnownColor method that allows you to retrieve the required colors.

Attached to this KB is a demo showing how to use this method.

Please see the Visual Studio documentation on the color class  for more information.

Old KB# 1549