By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,885 Members | 1,474 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,885 IT Pros & Developers. It's quick & easy.

BackColor - Not ?

P: n/a
Rob
This should be simple.....

The default BackColor of a button (if you look at its property) is "Control"
its a gray color, but apparently not a color.

During a process I set the BackColor of a button to another color by
using....

Me.Button.BackColor = Color.Yellow

At a later point I want to return it to its original "color"....

How do I specify "Control" as a "color" ?

You cannot do...

Me.Button.BackColor = Color.Control
or
Me.Button.BackColor = Control

Thanks !


May 30 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Me.Button.BackColor = Color.FromKnownColor(KnownColor.Control)
"Rob" <ro***@yahoo.comwrote in message
news:lc******************************@comcast.com. ..
This should be simple.....

The default BackColor of a button (if you look at its property) is
"Control" its a gray color, but apparently not a color.

During a process I set the BackColor of a button to another color by
using....

Me.Button.BackColor = Color.Yellow

At a later point I want to return it to its original "color"....

How do I specify "Control" as a "color" ?

You cannot do...

Me.Button.BackColor = Color.Control
or
Me.Button.BackColor = Control

Thanks !


May 30 '07 #2

P: n/a
"Ray Cassick" <rc******@enterprocity.comwrote in message
news:OX**************@TK2MSFTNGP02.phx.gbl...
Me.Button.BackColor = Color.FromKnownColor(KnownColor.Control)
Easier to use this.BackColor = SystemColors.Control

Michael
May 30 '07 #3

P: n/a
Rob
Thanks Ray !

"Ray Cassick" <rc******@enterprocity.comwrote in message
news:OX**************@TK2MSFTNGP02.phx.gbl...
Me.Button.BackColor = Color.FromKnownColor(KnownColor.Control)
"Rob" <ro***@yahoo.comwrote in message
news:lc******************************@comcast.com. ..
>This should be simple.....

The default BackColor of a button (if you look at its property) is
"Control" its a gray color, but apparently not a color.

During a process I set the BackColor of a button to another color by
using....

Me.Button.BackColor = Color.Yellow

At a later point I want to return it to its original "color"....

How do I specify "Control" as a "color" ?

You cannot do...

Me.Button.BackColor = Color.Control
or
Me.Button.BackColor = Control

Thanks !



May 30 '07 #4

P: n/a
"Michael C" <no****@nospam.comschrieb:
>Me.Button.BackColor = Color.FromKnownColor(KnownColor.Control)

Easier to use this.BackColor = SystemColors.Control
I'd recommend that too. In addition it may be useful to store the old value
in a private variable (or similar) and assign its value to the property
later.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

May 30 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.