• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 573
  • Last Modified:

Setting controls to a default backcolor?

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
BlakeMcKenna
Asked:
BlakeMcKenna
  • 2
1 Solution
 
ktaczalaCommented:
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
 
ktaczalaCommented:
Found it

try this buttonx.backcolor = Control.DefaultBackColor
works for all controls
0
 
BlakeMcKennaAuthor Commented:
ktaczala...that worked! I knew their had to be an object that did this!

thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now