String to button?????
-
can anyone figure out how to get this to work btn(mstrfind).enabled = true I need to figure out how i can call different buttons by inserting the names in the mstrfind since vb.net doesn't support controll arrays Any help whould be greatly appreciated []D[][]\/[][]D
-
can anyone figure out how to get this to work btn(mstrfind).enabled = true I need to figure out how i can call different buttons by inserting the names in the mstrfind since vb.net doesn't support controll arrays Any help whould be greatly appreciated []D[][]\/[][]D
...shot in the dark, just add them to a collection: dim mCollection as new collection mCollection.add Button1, Button1.Name ' Add the object using its name as a key mCollection.add Button2, Button2.Name ' Add another button mCollection.item("Form1.Button1").Enabled = false ' Disable button1 See? I hope this is a clear enough example. You could get complex with a type safe collection which only accepts controls or you could maybe have a class which inherits from a control container and that might give you additional functionality, but this suggestion is low down dirty and should work. Chris. Nursey