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?
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
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
-
X Suspends Encrypted DMs
by
Alex5723
10 minutes ago -
WSJ : My Robot and Me AI generated movie
by
Alex5723
28 minutes ago -
Botnet hacks 9,000+ ASUS routers to add persistent SSH backdoor
by
Alex5723
1 hour, 5 minutes ago -
OpenAI model sabotages shutdown code
by
Cybertooth
1 hour, 42 minutes ago -
Backup and access old e-mails after company e-mail address is terminated
by
M W Leijendekker
1 hour, 6 minutes ago -
Enabling Secureboot
by
ITguy
4 hours, 52 minutes ago -
Windows hosting exposes additional bugs
by
Susan Bradley
9 hours, 37 minutes ago -
No more rounded corners??
by
CWBillow
5 hours, 25 minutes ago -
Android 15 and IPV6
by
Win7and10
10 hours, 42 minutes ago -
KB5058405 might fail to install with recovery error 0xc0000098 in ACPI.sys
by
Susan Bradley
21 hours, 58 minutes ago -
T-Mobile’s T-Life App has a “Screen Recording Tool” Turned on
by
Alex5723
1 day ago -
Windows 11 Insider Preview Build 26100.4202 (24H2) released to Release Preview
by
joep517
19 hours, 14 minutes ago -
Windows Update orchestration platform to update all software
by
Alex5723
1 day, 7 hours ago -
May preview updates
by
Susan Bradley
19 hours, 22 minutes ago -
Microsoft releases KB5061977 Windows 11 24H2, Server 2025 emergency out of band
by
Alex5723
10 hours, 57 minutes ago -
Just got this pop-up page while browsing
by
Alex5723
1 day ago -
KB5058379 / KB 5061768 Failures
by
crown
21 hours, 15 minutes ago -
Windows 10 23H2 Good to Update to ?
by
jkitc
16 minutes ago -
At last – installation of 24H2
by
Botswana12
1 day, 23 hours ago -
MS-DEFCON 4: As good as it gets
by
Susan Bradley
10 hours, 33 minutes ago -
RyTuneX optimize Windows 10/11 tool
by
Alex5723
2 days, 11 hours ago -
Can I just update from Win11 22H2 to 23H2?
by
Dave Easley
10 hours, 8 minutes ago -
Limited account permission error related to Windows Update
by
gtd12345
3 days, 1 hour ago -
Another test post
by
gtd12345
3 days, 1 hour ago -
Connect to someone else computer
by
wadeer
2 days, 19 hours ago -
Limit on User names?
by
CWBillow
2 days, 23 hours ago -
Choose the right apps for traveling
by
Peter Deegan
2 days, 12 hours ago -
BitLocker rears its head
by
Susan Bradley
1 day, 20 hours ago -
Who are you? (2025 edition)
by
Will Fastie
1 day, 19 hours ago -
AskWoody at the computer museum, round two
by
Will Fastie
2 days, 15 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.