Reading & writing a colour

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
 
J

Jeff Johnson

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.
 
Z

Zach

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Link Button (II) ASP 5
on maximum size changed 5
StreamReader/Writer dealing with funny characters 10
OnClosing 5
Hovering Buttons 3
Split 14
Color box 4
Link Button Question (II) 9

Top