Hi Viper,
If you close a parent form (MDI Parent form, that is), you close all the
child forms with it. In your example of using Word doc, you are closing the
first child instance of the document... not the parent itself! When you
open any word document, it opens the Word MDI (the engine WINWORD.exe) along
with a child document. In the latest version of OSs (XP and 2003), the
interface is shown as if all the documents are SDI when in fact they are
not. Use your task manager and you'll notice there are as many instances of
word documents as you have opened, but if you look in the process tab, you
will notice only one winword.exe. Try killing the winword.exe process and
effectively, you'd kill all the word documents.
In your example, after showing the second form, the control comes back
to first form (which created and holds a reference to the second form). If
you want to have the second form stay alive after the first form is done
with, then make sure you have a reference to the second form outside the
scope of the first form. Like, add a new form variable in a third class.
One implementation could be...
clsShared.cls: