Need help unloading MDI Child 
Author Message
 Need help unloading MDI Child

Hi,

I would like to prevent the user from having access to two sections of
my application at the same time by having any open MDI Child forms
closed whenever the user causes a new MDI Child from another part of
the application to open.

The child forms are being called from a menu that can be accessed by
resizing and selecting.  I'd prefer not to remove the resize
button/option.

Any suggestions?

Thanks in advance.
--
Gnarly

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Thu, 11 Apr 2002 03:00:00 GMT  
 Need help unloading MDI Child
Try creating a procedure (in a module so it can be called by any form) that
tells the MDI form to loop through and close all but the Active Form.  Then
call the procedure as part of the Form_Load event or Form_Resize event for
each form.

Jeff

Quote:

> Hi,

> I would like to prevent the user from having access to two sections of
> my application at the same time by having any open MDI Child forms
> closed whenever the user causes a new MDI Child from another part of
> the application to open.

> The child forms are being called from a menu that can be accessed by
> resizing and selecting.  I'd prefer not to remove the resize
> button/option.

> Any suggestions?

> Thanks in advance.
> --
> Gnarly

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Thu, 11 Apr 2002 03:00:00 GMT  
 Need help unloading MDI Child
The above answer is good. Also try adding the "Unload Me" command as the
last line prior to "End Sub" to whatever menu or command button you are
using to load the next MDI form. I use it as a standard way to keep the
desktop clean and also prevent the opening of multiple instances of the same
MDI child.
John

Quote:
> Try creating a procedure (in a module so it can be called by any form)
that
> tells the MDI form to loop through and close all but the Active Form.
Then
> call the procedure as part of the Form_Load event or Form_Resize event for
> each form.

> Jeff


> > Hi,

> > I would like to prevent the user from having access to two sections of
> > my application at the same time by having any open MDI Child forms
> > closed whenever the user causes a new MDI Child from another part of
> > the application to open.

> > The child forms are being called from a menu that can be accessed by
> > resizing and selecting.  I'd prefer not to remove the resize
> > button/option.

> > Any suggestions?

> > Thanks in advance.
> > --
> > Gnarly

> > Sent via Deja.com http://www.deja.com/
> > Before you buy.



Sat, 13 Apr 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. MDI Help - Prevent Child Form from Exiting in Unload Event

2. MDI Help - Prevent Child Form from Exiting in Unload Event

3. need help regarding scroll bar in mdi and mdi child form

4. Cannot unload MDI child with Remote Data Control

5. mdi parent/child unload events

6. GPF in Krnl386.exe crashes VB5 IDE on unload of MDI child form

7. krnl386.exe GPF crashes VB5 IDE on MDI child unload

8. query unload of MDI child question

9. Unload MDI Child forms

10. Unloading MDI Child Forms

11. Unloading MDI Child Forms

12. unload top mdi child

 

 
Powered by phpBB® Forum Software