Using an open source application that is built on the .NET framework. It uses the Color Picker standard dialog box, which includes the ability to define custom colors. Is there a way to export the color definitions from one computer so they can be transferred to a second (or many…) computers?
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Save custom color (.net 2.0)
Home » Forums » Developers, developers, developers » DevOps Lounge » Save custom color (.net 2.0)
- This topic has 7 replies, 2 voices, and was last updated 17 years, 7 months ago.
AuthorTopicWSjacksonmacd
AskWoody LoungerOctober 18, 2007 at 3:53 am #445423Viewing 1 reply threadAuthorReplies-
WScharlotte
AskWoody LoungerOctober 20, 2007 at 10:40 pm #1080400You should be able to save the settings to an xml file and then read that into other apps. Caution: The same colors vary on machines depending on the type and brand of monitor and the video cards and settings in the computers, so don’t count on the same color on every box. Custom colors are asking for trouble, because a machine wil a different saturation setting might not display that color at all. Laptops now have hi-res monitors, but the color can vary radically between a laptop and a desktop machine due to the video cards, if nothing else.
-
WSjacksonmacd
AskWoody LoungerOctober 21, 2007 at 12:24 am #1080416Thanks for the tip about colour differences, Charlotte. I will keep that in mind. Not sure what you meant by saving the settings into an xml file — I don’t see any mechanism in the color dialog for doing that.
I dug around in the Registry, and found what I was looking for. Turns out that the application saves the custom colours into the HKCUSoftwareVB and VBA SettingsCustomColors key. I should be able to transfer that key from one computer to another, keeping in mind your caution about colours rendering differently on different computers.
The application is a mapping program, and it is important to exercise some control over the colour palette. I need a gradient of colours from light to dark in a single shade, so the maps convey the proper relationship when viewed on-screen in colour, as well as to reproduce properly on a monochrome laser printer. Custom colours seems like the only way to accomplish that task.
-
WScharlotte
AskWoody LoungerOctober 21, 2007 at 2:07 am #1080433There are a variety of ReadXML and WriteXML methods available through datasets, along with a feast of other methods for handling xml files. The problem with using the registry these days is that some companies lock their registries down so tight that you can’t do that. We have clients who have made the user permissions so stringent that we no longer rely on registry keys to control our applications. Instead we write settings to xml files in the Document & SettingsAll UsersApplication Data subfolder where we put the application itself. If you’re working with something internal to your company and can use registry settings, then there’s no barrier to doing it that way. But once the mechanisms are built for storing values in xml and retrieving them, that’s even simpler and doesn’t run afoul of any registry restrictions.
-
WSjacksonmacd
AskWoody LoungerOctober 21, 2007 at 8:20 am #1080441If I understand you correctly, there is no built-in method for Windows to persist the custom colors, and that the application itself is writing into the Registry. And since it is becoming less reliable to write into the Registry, the application should change its behaviour, and persist its information in xml files rather than the Registry. Is that correct?
I had been told (not by the author, but by another user who *seems* to be in the know), that application program was *not* persisting the custom colors, but that Windows was performing that function. I think you are telling me otherwise. I did a quick test using VB .Net 2005 Express by defining a custom color. Closed and restarted the .Net environment, and found that the custom color had disappeared. This supports what I understand you to be saying.
I appreciate your comments.
-
-
-
-
WSjacksonmacd
AskWoody Lounger -
WScharlotte
AskWoody LoungerOctober 21, 2007 at 8:11 pm #1080465Ah, I see. No, and I don’t recommend that you try to find a way to change the system colors from your application. Changing system settings is invasive and can get you in big trouble with the users and the IT department.
What you need to do is set the colors for your application only, and that’s where the xml file comes in. When the application loads, it can read the xml file and use the settings to create the colors you need IN YOUR APPLICATION. Create a class that handles returning the values for particular color settings and then have your forms and reports call into that class to set their own colors. Then no matter what odd color scheme the user may have selected, your application will display the information in the colors you decide on wherever it’s important. For example, we want lines and shading on reports to appear in several shades of gray, although we allow for an override by the application’s admin through a xml file we read in when the app launches. If you use System colors, like ControlText, etc., for the rest of your application, it will respond to the user settings for color, while you can control the colors when a specific screen is loaded.
-
WSjacksonmacd
AskWoody Lounger
-
-
Viewing 1 reply thread -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Login screen icon
by
CWBillow
3 hours, 9 minutes ago -
AI coming to everything
by
Susan Bradley
4 hours, 45 minutes ago -
Mozilla : Pocket shuts down July 8, 2025, Fakespot shuts down on July 1, 2025
by
Alex5723
6 hours, 56 minutes ago -
No Screen TurnOff???
by
CWBillow
7 hours, 17 minutes ago -
Identify a dynamic range to then be used in another formula
by
BigDaddy07
7 hours, 50 minutes ago -
InfoStealer Malware Data Breach Exposed 184 Million Logins and Passwords
by
Alex5723
19 hours, 27 minutes ago -
How well does your browser block trackers?
by
n0ads
5 hours, 45 minutes ago -
You can’t handle me
by
Susan Bradley
10 hours, 9 minutes ago -
Chrome Can Now Change Your Weak Passwords for You
by
Alex5723
5 hours, 13 minutes ago -
Microsoft: Over 394,000 Windows PCs infected by Lumma malware, affects Chrome..
by
Alex5723
1 day, 6 hours ago -
Signal vs Microsoft’s Recall ; By Default, Signal Doesn’t Recall
by
Alex5723
10 hours, 19 minutes ago -
Internet Archive : This is where all of The Internet is stored
by
Alex5723
1 day, 7 hours ago -
iPhone 7 Plus and the iPhone 8 on Vantage list
by
Alex5723
1 day, 7 hours ago -
Lumma malware takedown
by
EyesOnWindows
19 hours, 34 minutes ago -
“kill switches” found in Chinese made power inverters
by
Alex5723
1 day, 16 hours ago -
Windows 11 – InControl vs pausing Windows updates
by
Kathy Stevens
1 day, 16 hours ago -
Meet Gemini in Chrome
by
Alex5723
1 day, 20 hours ago -
DuckDuckGo’s Duck.ai added GPT-4o mini
by
Alex5723
1 day, 20 hours ago -
Trump signs Take It Down Act
by
Alex5723
2 days, 4 hours ago -
Do you have a maintenance window?
by
Susan Bradley
8 hours, 53 minutes ago -
Freshly discovered bug in OpenPGP.js undermines whole point of encrypted comms
by
Nibbled To Death By Ducks
1 day, 6 hours ago -
Cox Communications and Charter Communications to merge
by
not so anon
2 days, 7 hours ago -
Help with WD usb driver on Windows 11
by
Tex265
15 hours, 55 minutes ago -
hibernate activation
by
e_belmont
2 days, 16 hours ago -
Red Hat Enterprise Linux 10 with AI assistant
by
Alex5723
2 days, 20 hours ago -
Windows 11 Insider Preview build 26200.5603 released to DEV
by
joep517
2 days, 23 hours ago -
Windows 11 Insider Preview build 26120.4151 (24H2) released to BETA
by
joep517
2 days, 23 hours ago -
Fixing Windows 24H2 failed KB5058411 install
by
Alex5723
1 day, 19 hours ago -
Out of band for Windows 10
by
Susan Bradley
3 days, 4 hours ago -
Giving UniGetUi a test run.
by
RetiredGeek
3 days, 11 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.