Solved

Setting controls to a default backcolor?

Posted on 2014-01-29
3
513 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

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
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…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

627 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