Exiting a program..

cjard

Well-known member
Joined
Apr 25, 2006
Messages
7,081
Programming Experience
10+
I have an MDI app that has 2 forms. One form edits database entries, the other is a search results form that is shown sometimes if the user performs a search.

The search form is created and set to be an MdiChild having the same parent as the form that created it.

My File..Exit menu item calls Application.Exit() but if the search form is open, only the search form is closed. If any other forms are open but search is not, the Application quits as expected.

The search form is the only one where there may be multiple instances created dynamicaly at runtime. For all other forms I use the default Global.<formname> instance that microsoft provide as a VB nicety.

I do not wish to Environment.Exit() as this is too much like the never-recommended End in VB6

Does anyone have any thoughts on how i can get Application.Exit() to exit my App without calling it repeatedly?
 
Back
Top