views:

62

answers:

2

For instance, to make something blue I would go:

this.BackColor = Color.LightBlue;

How can I summon the Control color, the khaki one.

Thanks SO.

+6  A: 

The System.Drawing.SystemColors class has properties exposing the various system colours, so you can do

this.BackColor = SystemColors.Control;

The full range of properties to access other colours is listed on MSDN.

stevemegson
A: 

I haven't tested this, but I believe it to be:

this.BackColor = Control.DefaultBackColor;
Cloud