![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have an XML file that has settings for my app. Many of the settings involve color (i.e. <BackColor>Red</BackColor>). The XML value is read into a string, so I have a string called strBackColor with the value "Red". Now I want to set the form to BackColor.Red. How do I do this without having a giant SELECT like this... SELECT CASE strBackColor CASE "Red" Me.BackColor = Backcolor.Red CASE "Blue" Me.BackColor = Backcolor.Red ... END SELECT Acually, I want it to be part of a global shared method that I can use throughout my system, where I pass in a String and it returns the color..like Me.BackColor = CStringToColor(strBackColor) Thanks for your help, Terry |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |