BackColor - Not ?

R

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 !
 
H

Herfried K. Wagner [MVP]

Michael C said:
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.
 

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