That's what I need, except I want to use the info to instantiate my User
Control. I want to put your suggested code in a function and return the User
Control back to the calling routine. This function returns Types, and I can't
seem to convert the Type returned to a User Control.
Any ideas how to do that?
Thanks for all your help.
"Herfried K. Wagner [MVP]" wrote:
"Dave" <Da**@discussions.microsoft.com> schrieb: How can my executable determine the classes (specifically User Controls)
in
itself? My program needs to know the list of User Controls that are in it.
'[Assembly].GetExecutingAssembly.GetTypes' will return an array of types
defined in the assembly. Then you can check each 'Type' object's 'BaseType'
property and compare it to the 'UserControl' type.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>