473,387 Members | 1,483 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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.
May 16 '06 #1
2 803
"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/>

May 16 '06 #2
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/>

May 17 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Danny J. Lesandrini | last post by:
First, this is _not_ a question about how to get Crystal Reports to run on a client machine. I've got all the merge modules added to the project and it's working fine. The question is about...
0
by: MichaƂ Januszczyk | last post by:
Hello. I've got the following problem: I created a windows installer project that installs my application. The application works with some files. I want to include some example files with the...
2
by: Tim Blizard | last post by:
I know this topic has been discussed before but I couldn't find any thread more recent than about 18 months and was interested in what conclusions people had come to recently. Invariably 3...
5
by: Sean | last post by:
Hi, I need to save data into a XML file using an existing schema (I have the ..xsd file) If the record exists then the data must be read from the DB in MS Access 2000 and saved into a XML...
2
by: Glen | last post by:
As I understand it, when the first page of an application is accessed, all ASPX/ASCX/etc. files in the same folder are compiled using the JIT compiler. Is there a way to turn this feature off? ...
0
by: Danny J. Lesandrini | last post by:
Didn't get any takers on this post this morning at dotnet.General, so I'm reposting here. First, this is _not_ a question about how to get Crystal Reports to run on a client machine. I've got...
3
by: Herby | last post by:
Im rewriting a current MFC application for .NET using C++\CLI that compiles \clr SAFE. My application needs to read application settings, it used to do this from the old application ini file via...
0
by: Kleanthis | last post by:
I have a problem, when deploying multilingual applications using cab files on Compact Framework 2.0. It seems that something is going wrong with compact framework 2.0 Below I have a description...
6
by: (PeteCresswell) | last post by:
User wants to go this route instead of storing pointers in the DB and the documents outside. Only time I tried it was with only MS Word docs - and that was a loooong time ago - and it seemed to...
1
by: Claire | last post by:
Ive written a small string resource building utility that I send out to our translators. I have a setup project for each language we support, which picks out a group of 12 english resx files plus...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.