Solved

Setting controls to a default backcolor?

Posted on 2014-01-29
3
507 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 12

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 12

Accepted Solution

by:
ktaczala earned 500 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Suggested Solutions

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

738 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