473,766 Members | 2,026 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting classes running

public class Form1 : System.Windows. Forms.Form
{
MyClass myclass;

public Form1()
{
myclass = new MyClass();
}
}

In one moment i need to know all the classes created. How
can i know this. I can get all the controls with
System.Collecti ons.IEnumerator enume =
this.Controls.G etEnumerator();

but what about the classes?

Thanks,
Nov 15 '05 #1
3 1424
Are you truly referring to all classes instantiated? Only your or the
entire framework? There are a lot of classes that get loaded in to the
system, both yours and the systems, but I do not think that there is a way
to determine the classes that are loaded.

Maybe you can provide more detail into your problem and someone may come up
with an awesome solution.

Basically, if there are only certain classes that you want to keep track of,
you might want to wrap their creation in some factor class that maintains a
reference to the class for later use.
"toki" <pe*******@hotm ail.com> wrote in message
news:04******** *************** *****@phx.gbl.. .
public class Form1 : System.Windows. Forms.Form
{
MyClass myclass;

public Form1()
{
myclass = new MyClass();
}
}

In one moment i need to know all the classes created. How
can i know this. I can get all the controls with
System.Collecti ons.IEnumerator enume =
this.Controls.G etEnumerator();

but what about the classes?

Thanks,

Nov 15 '05 #2
tok
*spanish*
I need to make a user control that adjust some paremeters
of some (equals) COM objects created in run-time on a main
form.
This COM objects can be stored in an array like not.

Xtend[] xtend = new Xtend[10];
Xtend xtend1 = new Xtend();

I need to wrap all these "Xtend" COM object in order to
enumerate it and load it in a list box to bla bla...

I know how to access to the forms controls with
System.Collecti ons.IEnumerator enume =
this.Controls.G etEnumerator();

but i have not idea how can i wrap my run-time COM objects.

Very Thanks,

-----Original Message-----
Are you truly referring to all classes instantiated? Only your or theentire framework? There are a lot of classes that get loaded in to thesystem, both yours and the systems, but I do not think that there is a wayto determine the classes that are loaded.

Maybe you can provide more detail into your problem and someone may come upwith an awesome solution.

Basically, if there are only certain classes that you want to keep track of,you might want to wrap their creation in some factor class that maintains areference to the class for later use.
"toki" <pe*******@hotm ail.com> wrote in message
news:04******* *************** ******@phx.gbl. ..
public class Form1 : System.Windows. Forms.Form
{
MyClass myclass;

public Form1()
{
myclass = new MyClass();
}
}

In one moment i need to know all the classes created. How can i know this. I can get all the controls with
System.Collecti ons.IEnumerator enume =
this.Controls.G etEnumerator();

but what about the classes?

Thanks,

.

Nov 15 '05 #3
toki, if you just want to know the assemblies loaded for your AppDomain you
could use AppDomain.GetAs semblies(). Once you know that you can find out
what classes are in each assembly using reflection. You could also call
GetLoadedModule s() on each of the Assemblies to find out which modules have
been loaded. You won't be able to find out what actual classes have been
invoked with all of that though. I don't think there is a way to do that
without querying the CLR. Anyone else know how to get that info?

--
Greg Ewing [MVP]
http://www.citidc.com
"toki" <pe*******@hotm ail.com> wrote in message
news:04******** *************** *****@phx.gbl.. .
public class Form1 : System.Windows. Forms.Form
{
MyClass myclass;

public Form1()
{
myclass = new MyClass();
}
}

In one moment i need to know all the classes created. How
can i know this. I can get all the controls with
System.Collecti ons.IEnumerator enume =
this.Controls.G etEnumerator();

but what about the classes?

Thanks,

Nov 15 '05 #4

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

Similar topics

1
1327
by: John S | last post by:
I seem to be having trouble with trying to access Management classes for a remote XP machine from the Server Manager in Visual Studio .Net. I can access the classes for several servers running Windows Server 2000/2003 and from a test PC I can access the classes of my main PC running XP. However if I try to access the classes of the test PS from my main one I get an error stating that "The RPC server is unavailable". There is also an...
12
2019
by: Sunny | last post by:
Hi All, I have a serious issue regarding classes scope and visibility. In my application, i have a class name "TextFile", and also a few other classes like "TotalWords", "TotalLines" and etc.., which are suppose to describe the structure of my main TextFile class. Also i have created some custom collection classes, which only take items of the types, they are designed for. Now the problem is that I want my element classes, like...
4
1186
by: Marco Martin | last post by:
Hi, I developed an application on my workstation which is a P4 2.4G. Now that my application is almost finished, I find out that this app will be used on the road by technicians using laptops(gota love inter-office communication). This causes a *major* problem because my app is very UI intensive (its got many graphs displayed in real-time) and tests on our own laptops show that they just cant cut it. (I'm not saying anything againts...
10
1302
by: Razzie | last post by:
Hi all, The title of this post may sound a bit weird, but I was wondering about the following nonetheless. I have a class libray containing, say, 4 classes: A, B, C, D. Class A somehow has a reference to B, B has a reference to C, and C to D. If an exception happens in class D, I would like class A to get a notification of this (all execution on classes B to D should be terminated). I am wondering how to do this. The following seems...
5
1384
by: Craig | last post by:
I started this week recomipling all our projects under vc++7 which is ok by me. most of it worked fine and what the compiler spat out was quickly fixed without too much bother. Then came a service. Now this services works a treat under vc++6. under vc++7 it runs but completely skips over the most important part, i.e. the bit that does the work. I could handle this a whole lot better if the debugger wasn't so painfully slow. Its like...
8
10015
by: Rod | last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some reason, opening some ASP.NET applications we wrote is producing the following error message: "The Web server reported the following error when attempting to create or open the Web project located at the following URL: 'http://localhost/WebApplication1'. 'HTTP/1.1 500 Internal Server Error'."
3
3010
by: RD | last post by:
I have a VBV.NET application that runs on a timer to do a job at one hour intervals. Basically the sequence is as follows the timer event fires 1- the timer get turned off 2- the code then checks to see if we're just changed hour from when the previous transfer session took place IF yes the code executes an FTP transfer from an FTP site. When the transfer is completed the file received is parsed (it's a comma
33
11864
by: JamesB | last post by:
I am writing a service that monitors when a particular app is started. Works, but I need to get the user who is currently logged in, and of course Environment.UserName returns the service logon (NT_AUTHORITY\SYSTEM). I understand that when the service starts, no user may be logged in, but that's ok, as the app I am monitoring can only be run by a logged in user. Do I need to use WMI to get the user context of Explorer.exe or is there a...
4
5729
by: imaloner | last post by:
I am posting two threads because I have two different problems, but both have the same background information. Common Background Information: I am trying to rebuild code for a working, commercially sold application with only partial build instructions. The previous maintainer of the code (a mixture of C and C++) is no longer with the company, but when he built the code he used MSVC++, and though I am not certain of the version he was ...
0
9404
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10168
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9959
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8833
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7381
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6651
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3929
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.