Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Setting controls to a default backcolor?

Posted on 2014-01-29
3
Medium Priority
?
542 Views
Last Modified: 2014-01-29
I was wondering if there is anykind of enumeration that has a default setting for colors...like this:  color.default

I ask because in my application, the user has control of the look of the app which includes setting colors. Is there a way to reset all controls to a default setting?

Thanks!
0
Comment
Question by:BlakeMcKenna
  • 2
3 Comments
 
LVL 13

Expert Comment

by:ktaczala
ID: 39819363
depends on your color scheme.

if you do this:
dim mycontrolscolor as color = button.backcolor

and save that value somewhere

you can do:
button.backcolor = mycontrolcolor

to reset it back to startup default
when I did the first part this is what I got for the default color of a button
mycolor = "{Name=Control, ARGB=(255, 240, 240, 240)}"
other controls may have different defaults, you'll have to get them all and save them
0
 
LVL 13

Accepted Solution

by:
ktaczala earned 2000 total points
ID: 39819381
Found it

try this buttonx.backcolor = Control.DefaultBackColor
works for all controls
0
 

Author Closing Comment

by:BlakeMcKenna
ID: 39819403
ktaczala...that worked! I knew their had to be an object that did this!

thanks!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question