Collection of all instantiated forms?

  • Thread starter Thread starter Hubert Hermanutz
  • Start date Start date
H

Hubert Hermanutz

Hi,

do in .NET the possibility exists, to obtain a collection of all
instantiated forms?

Can anythink help me?

Thanks in advance,
Hubert
 
Hubert said:
Hi,

do in .NET the possibility exists, to obtain a collection of all
instantiated forms?

Can anythink help me?

Thanks in advance,
Hubert

No, you'll need to keep track of them yourself.
I would reccomend creating a TrackedForm class that inherits from Form, has
a Shared/static ArrayList, and adds itself when the constructor is called.
You might want to override Close and remove closed forms.
Then just make all your derived forms inherit from TrackedForm instead of
Form.

- Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top