Home All Groups Group Topic Archive Search About

Reading color from a text file FromArgb

Author
8 Apr 2005 12:21 AM
Sam
Hi All

I'm having problem (which seems to be simple) to convert my color settings
using FromArgb method. The colors are saved to a text file as string, using
ToArgb.ToString method. For example one of my colors has a value of
14822282. This value will then be read when a user opens his input file and
convert to color using FromArgb method. With the value above, here is what
I'm currently having mycolor =
color.FromArgb(system.int32.parse(14822282)). Could anyone tell me where I
went wrong? Thanks


Regards,

Sam

Author
8 Apr 2005 6:23 AM
Cor Ligthert
Sam,

This works for me.
Me.Button1.BackColor = Color.FromArgb(CInt("14822282"))

I hope this helps,

Cor
Author
8 Apr 2005 7:53 AM
Sam
Hi Cor

Thanks for the help. I got it

Sam

Show quoteHide quote
"Cor Ligthert" <notmyfirstn***@planet.nl> wrote in message
news:u97aMOAPFHA.1528@TK2MSFTNGP09.phx.gbl...
> Sam,
>
> This works for me.
> Me.Button1.BackColor = Color.FromArgb(CInt("14822282"))
>
> I hope this helps,
>
> Cor
>
>