Writing Default Button.backcolor color to File

motti100

Member
Joined
Mar 6, 2005
Messages
19
Programming Experience
1-3
Hi

I have a form with a few objects, mostly buttons..
The buttons have different color backgrounds and foregrounds, depending on which color I choos.

question:

How can I write the "default" (on form load) colors of button backgrounds and foregrounds to a file?Thanks
 
the default BackColor is SystemColors.Control
the default ForeColor is SystemColors.ControlText

for buttons

do you really need to save those to a file?
 
You can write the values to a file using several methods, I would suggest using XML and an XMLWriter.
You would have to get some string representation of the color by using one of the conversion functions: ToArgb/FromArgb, ToKnownColor/FromKnownColor, ... and converting that value to a string to save in the file.
 
Back
Top