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???????
Printable View
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???????
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
[email protected]
The best way to escape a problem, is to solve it.
In the Unload event of your main Window, loop through the forms collection and close all the other forms.
This works, I overlooked the fact that forms must be treated like objects.
Thanks