You can save this information to the <Settings>
information for the project.
You can add this info by double-clicking on "my project"
in the solution explorer. This brings up the project
properties. Click on the <Settings> tab.
Add the settings here. Each setting must have a
unique name, such as ProductTextBoxColor,
CustomerTextBoxColor, etc.
For Type, set it to System.Drawing.Color.
Set the scope to User.
Then in your code, when the user changes it, save it to
the settings:
My.Settings.ProductTextBoxColor = Color.PaleVioletRed
Then when you want to use it, use My.Settings.ProductTextBoxColor
instead of a color. It will retrieve the value from the Settings
and use it.
ProductTextBox.BackColor = My.Settings.ProductTextBoxColor
The .Net runtime saves the settings when the application is
closed, and reads them when it is opened.
You can use the ColorDialog to allow the user to select
a color. I would save it to My.Settings at that point,
then turn around and assign it using My.Settings.ProductTextBoxColor;
this way you can ensure that it's working properly.
Robin S.
>I wanted to convert it to a string to keep the users choice in a
>configuration file with some other options. How can I save it as a color
[quoted text clipped - 36 lines]
>>>
>>> HELP please