textbox color to string

  • Thread starter Thread starter Tom McLaughlin
  • Start date Start date
I am not sure what your asking but my code looks like this:

dim tbString as String

tbString = textbox.backcolor

I get the following error

Value of type "System.Drawing.Color" can not be converted to "String".
 
Hi Tom,

I don't know whether you loked at the Members list for Color. It's not all
colour names. Somewhere in there are the instance members. Name is just one of
them.;-)

TextBox.BackColor.Name

Regards,
Fergus
 
I am not sure what your asking but my code looks like this:

dim tbString as String

tbString = textbox.backcolor

I get the following error

Value of type "System.Drawing.Color" can not be converted to "String".

textbox.BackColor.ToString() works for me. I wasn't sure if you were
after a string representation of the RGB values.

Rgds,
 
Back
Top