user2895707 user2895707 - 1 year ago 102 Question

Convert a String to a System.Color in .NET

Good day, I'm trying to make this application on VB.NET in which the user can change the background color of the application, when the application closes the color should save to a XML. The saving was piece of cake but now the real dilemma is how to convert the String

to a

I already Googled my problem but no result. Plus I'm already familiar to

Thanks in advanced.

Answer Source
Dim C = System.Drawing.Color.FromName(YourColorString.Replace("Color[" , "").Replace("]", ""))
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download