We want to dynamically (depending on a XML File) set the BackColor
of a Control in Windows Forms.
I just tried the CallByName
-Method with CallType.Method
.
CallByName(ColorObject, "FromName", CallType.Method, "Red")
When I want to execute the "FromName" Method it doesn't work, because I need it like this "Color.FromName".
The CallByName got a object from the Class "Color" but still doesn't work. The "Color"-Class is imported.
Does anybody got an idea what I'm doing wrong or how I could solve this problem?