Reading & writing a colour

  • Thread starter Thread starter Zach
  • Start date Start date
Z

Zach

Is there a way to store a color in a file and later on retrieve it?
If so, how is it done? Could you please give me a code example?

Zach
 
Is there a way to store a color in a file and later on retrieve it?
If so, how is it done? Could you please give me a code example?

You could use the Color.ToArgb() instance method to get an int, write that
to your file, and then later read an int from the file and use the static
Color.FromArgb() method to get your color back from that int.
 
Jeff Johnson said:
You could use the Color.ToArgb() instance method to get an int, write that
to your file, and then later read an int from the file and use the static
Color.FromArgb() method to get your color back from that int.
Thank you,
Zach
 
Back
Top