By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,455 Members | 1,430 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,455 IT Pros & Developers. It's quick & easy.

Collection of all instantiated forms?

P: n/a
Hi,

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

Can anythink help me?

Thanks in advance,
Hubert

Nov 15 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hubert Hermanutz wrote:
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
Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.