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, 5 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
-
Office apps read-only for family members
by
b
19 minutes ago -
Defunct domain for Microsoft account
by
CWBillow
5 hours, 41 minutes ago -
24H2??
by
CWBillow
2 hours, 16 minutes ago -
W11 23H2 April Updates threw ‘class not registered’
by
WindowsPersister
2 hours, 59 minutes ago -
Master patch listing for April 8th, 2025
by
Susan Bradley
9 hours, 14 minutes ago -
TotalAV safety warning popup
by
Theodore Nicholson
2 hours, 40 minutes ago -
two pages side by side land scape
by
marc
1 day, 16 hours ago -
Deleting obsolete OneNote notebooks
by
afillat
1 day, 18 hours ago -
Word/Outlook 2024 vs Dragon Professional 16
by
Kathy Stevens
21 hours, 1 minute ago -
Security Essentials or Defender?
by
MalcolmP
23 hours, 45 minutes ago -
April 2025 updates out
by
Susan Bradley
6 hours, 20 minutes ago -
Framework to stop selling some PCs in the US due to new tariffs
by
Alex5723
17 hours, 7 minutes ago -
WARNING about Nvidia driver version 572.83 and 4000/5000 series cards
by
Bob99
7 hours, 12 minutes ago -
Creating an Index in Word 365
by
CWBillow
1 day, 9 hours ago -
Coming at Word 365 and Table of Contents
by
CWBillow
1 day, 1 hour ago -
Windows 11 Insider Preview Build 22635.5170 (23H2) released to BETA
by
joep517
2 days, 13 hours ago -
Has the Microsoft Account Sharing Problem Been Fixed?
by
jknauth
2 days, 16 hours ago -
W11 24H2 – Susan Bradley
by
G Pickerell
2 days, 18 hours ago -
7 tips to get the most out of Windows 11
by
Alex5723
2 days, 16 hours ago -
Using Office apps with non-Microsoft cloud services
by
Peter Deegan
2 days, 9 hours ago -
I installed Windows 11 24H2
by
Will Fastie
16 hours, 3 minutes ago -
NotifyIcons — Put that System tray to work!
by
Deanna McElveen
2 days, 21 hours ago -
Decisions to be made before moving to Windows 11
by
Susan Bradley
3 hours, 14 minutes ago -
Port of Seattle says ransomware breach impacts 90,000 people
by
Nibbled To Death By Ducks
3 days, 6 hours ago -
Looking for personal finance software with budgeting capabilities
by
cellsee6
2 days, 14 hours ago -
ATT/Yahoo Secure Mail Key
by
Lil88reb
2 days, 14 hours ago -
Devices with apps using sprotect.sys driver might stop responding
by
Alex5723
3 days, 23 hours ago -
Neowin – 20 times computers embarrassed themselves with public BSODs and goofups
by
EP
4 days, 7 hours ago -
Slow Down in Windows 10 performance after March 2025 updates ??
by
arbrich
7 hours, 12 minutes ago -
Mail from certain domains not delivered to my outlook.com address
by
pumphouse
3 days, 16 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.