MDI Form with Single Child Instance??

Armjamil

New member
Joined
Nov 8, 2005
Messages
4
Programming Experience
1-3
Hi,
Following is how my application is setup:

- MDI Parent (contains Main Menu)
--- Project Form (NEW/OPEN)
----- Rest of the Forms

User can Open or create a new project from the MDI's File Menu but I want only one Instance of Project Form at any given time.
How can I close the existing Instance of Project form if the user click on 'New Project' or 'Open Project' on the MDI's File Menu.
Should I declare a Public variable and keep a reference of 'Project Form' there? or is there any other way.

I apologize if I'm not clear in defining my situation.
 
There is no point creating a new window and destroying the old one each time. Just create a new document in the existing window. You could have a variable in your parent form that references the child. If that reference is Nothing then open a form. If it's not Nothing then use it for the new document.
 
Back
Top