|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Files in an application?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. "Dave" <D***@discussions.microsoft.com> schrieb: '[Assembly].GetExecutingAssembly.GetTypes' will return an array of types > 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. 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/> 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. Show quoteHide quote "Herfried K. Wagner [MVP]" wrote: > "Dave" <D***@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/> > >
Byte to Chr - not correctly translated!!
GetDefaultPrinter VB.NET Windows Service Question (Timing) How Do I Put An End Of Line Character In A TextBox Saving a JPG from the web to local disk User Software Settings and System Software Settings in Windows Regsitry Dynamically Create Timers are Run-Time VB Express - How to access query value on my form? Confusion over namespaces CSV file reading every other record... |
|||||||||||||||||||||||