Iterating all open forms

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Daniel

    Iterating all open forms

    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


  • Daniel

    #2
    Re: Iterating all open forms

    Sorry found how...

    For anyone else who doesnt know:

    FormCollection fc = Application.Ope nForms;

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



    "Daniel" <DanielV@vestry online.comwrote in message
    news:uzMFg6hPHH A.1380@TK2MSFTN GP05.phx.gbl...
    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
    >

    Comment

    Working...