-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ah, that's because you're saving the result of ToString() method to the
registry. Unfortunately, there's no easy way to convert it back to Color
~ other than examining the string--and definitely you can't cast it to
Color because it's a string!
It's better to save the result of calling ToArgb() to the registry. When
you load the int value back and need to instantiate a Color object from
that, you can just say:
Color col = Color.FromArgb(<put the int from the Registry here>);
Morten Wennevik wrote:
| Saving a color object to registry will set it's value to something like
| "Color [Red]", or "Color [A=255, R=123, G=234, B=231]",
| but how do I get this back into a Color object???
|
| Casting it to Color only causes an exception.
|
- --
Ray Hsieh (Ray Djajadinata) [SCJP, SCWCD]
ray underscore usenet at yahoo dot com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (MingW32)
Comment: Using GnuPG with Thunderbird -
http://enigmail.mozdev.org
iD8DBQE/nnFPwEwccQ4rWPgRAiw4AJ9FYtAbDAsnn2lkNwv5XH6QNldySACfedAF
1OuxNwXHBgtVDRAZ55VQx7M=
=bG0X
-----END PGP SIGNATURE-----