Iterating all open forms

D

Daniel

Hi

I have a an application that opens up forms as it runs. So at any time 5
forms may be open for example, each form represents a room.

I need a way to iterate through these forms so that someone doesn't open the
same one twice. Is there a built in way of doing this? c#, .net. So i would
iterate and check the requested room id and say if a form representing that
room is open, just make that one the focus.

Thanks
 
D

Daniel

Sorry found how...

For anyone else who doesnt know:

FormCollection fc = Application.OpenForms;

foreach (Form frm in fc)
{
//iterate through
}
 

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

Top