V
VM
Hi,
Is it possible to open always only one instance of a MDIChild form?
Say, if form A is already opened, just give it the focus.
I tried declaring theMDIChild forms as private members of the MDI form
(using the MDI menu's script), but when the MDIChild form is closed (x
button pushed), I cannot open again the MDIChild form.
Example:
// aForm is a private member of the MDI form.
if (aForm.Visible)
aForm.Activate();
else
aForm.Show();
// This works nice once, and the form gets the focus once it's already
opened, but if it's closed *once* it doesn't open again.
Is it possible to open always only one instance of a MDIChild form?
Say, if form A is already opened, just give it the focus.
I tried declaring theMDIChild forms as private members of the MDI form
(using the MDI menu's script), but when the MDIChild form is closed (x
button pushed), I cannot open again the MDIChild form.
Example:
// aForm is a private member of the MDI form.
if (aForm.Visible)
aForm.Activate();
else
aForm.Show();
// This works nice once, and the form gets the focus once it's already
opened, but if it's closed *once* it doesn't open again.