R
RatFree
At run-time is there a way to get the names of all form classes and the
controls defined within each without instantiating the form classes?
I'm not doing any dynamic adding to the controls so the set of controls
added at design-time would be what I'm looking for.
If it can't be accomplished without instantiating then I do have code
to get all the controls from a given form class by instantiating that
form. What I'm having trouble with is getting all the form classes
within an application and instantiating each of those. The following
snippet will display the class name of each class defined in the
application, however I'm having trouble picking out only those that
inherit form and how to instantiate those that do.
Dim thisExe As System.Reflection.Assembly
thisExe = System.Reflection.Assembly.GetExecutingAssembly()
For Each oType As Type In thisExe.GetTypes
MsgBox(oType.ToString)
Next
Thanks,
Bill
controls defined within each without instantiating the form classes?
I'm not doing any dynamic adding to the controls so the set of controls
added at design-time would be what I'm looking for.
If it can't be accomplished without instantiating then I do have code
to get all the controls from a given form class by instantiating that
form. What I'm having trouble with is getting all the form classes
within an application and instantiating each of those. The following
snippet will display the class name of each class defined in the
application, however I'm having trouble picking out only those that
inherit form and how to instantiate those that do.
Dim thisExe As System.Reflection.Assembly
thisExe = System.Reflection.Assembly.GetExecutingAssembly()
For Each oType As Type In thisExe.GetTypes
MsgBox(oType.ToString)
Next
Thanks,
Bill