H
Henry Jones
VB.NET Windows Forms VS 2005
I would like to give the user the option of changing the background color of
the textbox to anything they want. Can someone provide code how to save the
textbox1.BackColor to a string and then convert it back to a color that I
can assign to the textbox?
I have looked at colorconverter class which can inherit from the
TypeConverter class and it's all too confusing. I tried some examples and
just can't get it.
I tried something like this:
Dim myColor As Color = Color.PaleVioletRed
' Create the ColorConverter.
Dim converter As System.ComponentModel.TypeConverter = _
System.ComponentModel.TypeDescriptor.GetConverter(myColor)
and it works if the color is already set, but what if I want the user to
choose from the Color Dialog box?
HELP please
I would like to give the user the option of changing the background color of
the textbox to anything they want. Can someone provide code how to save the
textbox1.BackColor to a string and then convert it back to a color that I
can assign to the textbox?
I have looked at colorconverter class which can inherit from the
TypeConverter class and it's all too confusing. I tried some examples and
just can't get it.
I tried something like this:
Dim myColor As Color = Color.PaleVioletRed
' Create the ColorConverter.
Dim converter As System.ComponentModel.TypeConverter = _
System.ComponentModel.TypeDescriptor.GetConverter(myColor)
and it works if the color is already set, but what if I want the user to
choose from the Color Dialog box?
HELP please