|Hello Dave and Thank You very Much,
I understand and agree with you completely but I am taking an inverse approach due to my apps functionality. I am creating a SendKeys keyboard emulator which will have a pre compiled set of universal buttons all referenced by the simple button1-n name. I will have an excel config file with the button’s parameters (visibility, location, size, text, colors.... and key code) which will be loaded for each application I want to keyboard emulate. Instead of having to have multiple form layouts and keycodes for each interface application I will have a simple excel file to copy cut and paste parameters.
So from my excel config I can set number and string parameters but I can't store and retrieve object oriented parameters (def?), I have to store & retrieve them as strings.
The problem that hangs me up is when I have a parameter such as FlatStyle with has arguments of Standard, Flat, PopUp... that are not strings but some type of object property. So when I need to retrieve PopUp as a string I need to convert it to a type of object property.
var TypeOfStyleObject = convert-this-string-to-what-FlatStyle-wants("PopUp"); // PopUp will actually be a StringArray[x]
button1.FlatStyle = TypeOfStyleObject;
I studied the link you pointed out and it solved my problem, with an exception. I fetched the name of the CONTROL (not a specific control like Button) and changed my function input from BUTTON to CONTROL. It passed without error but I did find a catch....
In the function that I apply the configuration parameters to the generic buttons I successfully applied Text, BackColor, ForeColor as a quick test. When I was passing the Button control I was setting FlatStyle but getting a string to object error (above). Now that I am passing the Control control it is saying my "Control" does not have a parameter FlatStyle. I am interpreting this way..... the Control lets me work without specifying the type of object(button, label, RTBox) but I may lose access to some parameters??? Accurate??
I may need to still find a way of passing specific controls instead of generic control object so I don’t lose configurability. I could follow your lead of preloading a Button object array and trying see if I can use its index as an object.
Am going anywhere but backwards or circles…… I assuming there has to be some methods that allows you to convert-this-string-to-what-AnyObject-wants() so objects can be acted on in loops and sequences. You have to be able to store & retrieve non numeric config info (strings) that represent object.string.parameterss!!!!! read them & convert to string, save, retrieve, convert string back to object.
Thank You Again………….