Iterate through non-MDI forms

Posts   
 
    
Jeff M
User
Posts: 250
Joined: 04-Aug-2004
# Posted on: 30-Jul-2005 18:53:26   

Hi y'all.

Can anyone give me an idea how I can iterate through non-MDI open forms using C#? I need to set up an algorithm so that I don't re-instantiate forms that already exist.

I'm not talking about using a singleton pattern. There may be multiple versions of the same form open, but each form contains contents from different data records.

Thanks!

Jeff

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39801
Joined: 17-Aug-2003
# Posted on: 30-Jul-2005 20:28:19   

there has to be a central form, in there keep track of each form's GUID (you give each form a guid) in a hashtable: guid (key) -> form instance reference (value). Iteration through these is then a piece of cake simple_smile

Frans Bouma | Lead developer LLBLGen Pro
Jeff M
User
Posts: 250
Joined: 04-Aug-2004
# Posted on: 31-Jul-2005 02:15:21   

Oh... I KNEW that... I was just TESTING you.

(j/k)

Thanks Frans.