PRB: Infinite Loop if Modal Form Shown in MDIChild's QueryUnload (189617)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q189617 SYMPTOMS
When attempting to close an MDI parent form, the application gets caught in
an infinite loop of showing a modal form.
CAUSE
When the MDI parent form is closed, the QueryUnload events of all MDI child
forms are called. If any one of these MDI child forms displays a modal form
during this event, such as prompting to save information, the infinite loop
is initiated.
This behavior will not occur if the MDI child form is closed before the MDI
parent is closed.
RESOLUTION
To work around this problem, explicitly unload the MDI child form in either
the QueryUnload event of that MDI child or in the QueryUnload event of the
MDI parent.
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 5/13/2003 |
---|
Keywords: | kbprb KB189617 |
---|
|