G
Guest
Can someone help me figure out a way to open a form only once in an MDI app.
I have an MDI app that contains several forms. I use each form depending on
the type of document that the user needs to see, i.e. for documents of type
A, I use form A, for type B, form B, etc. Each document has a unique number.
I need the app to only show one document at a time, i.e. ifthe user tries to
open doc. 1 of type A, then open form A and load doc 1. If then the user
tries to open the same doc, just focus on the open form, rather than creating
a new form of type A.
I tried implementing a singleton design pattern, and it worked fine, but of
course now I can only open one form of type A, B, C etc.
Thank you for your help.
I have an MDI app that contains several forms. I use each form depending on
the type of document that the user needs to see, i.e. for documents of type
A, I use form A, for type B, form B, etc. Each document has a unique number.
I need the app to only show one document at a time, i.e. ifthe user tries to
open doc. 1 of type A, then open form A and load doc 1. If then the user
tries to open the same doc, just focus on the open form, rather than creating
a new form of type A.
I tried implementing a singleton design pattern, and it worked fine, but of
course now I can only open one form of type A, B, C etc.
Thank you for your help.