Click to See Complete Forum and Search --> : MDI program won't die


dave clarke
February 15th, 2000, 11:03 AM
I have an standard exe with an MDIform which calls both child and normal forms. The program uses an ActiveX .dll. The program does not quit after the unload event but the component terminates, what is wrong???????

Cakkie
February 15th, 2000, 01:00 PM
When using multiple forms, when other forms (from the same program) are loaded and you close a form, the other forms remain active, and the app won't end. To overcome this, add the end command in the form_terminate event. Do this only on the 'main' form of your project, otherwise you might just end the program unwanted, but when the main form is closed, the app will end because it is told so by the form_terminate event.

Tom Cannaerts
slisse@planetinternet.be

The best way to escape a problem, is to solve it.

Kyle Burns
February 15th, 2000, 01:36 PM
In the Unload event of your main Window, loop through the forms collection and close all the other forms.

dave clarke
February 16th, 2000, 02:50 AM
This works, I overlooked the fact that forms must be treated like objects.

Thanks