Reading color from a text file FromArgb

S

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
 
C

Cor Ligthert

Sam,

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

I hope this helps,

Cor
 

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

Top