Article ID: 103461
Article Last Modified on 8/16/2005
APPLIES TO
- Microsoft Visual Basic 1.0 Standard Edition
- Microsoft Visual Basic 2.0 Standard Edition
- Microsoft Visual Basic 3.0 Professional Edition
- Microsoft Visual Basic 2.0 Professional Edition
- Microsoft Visual Basic 3.0 Professional Edition
- Microsoft Visual Basic for MS-DOS
This article was previously published under Q103461
SYMPTOMS
Any of the following error messages can occur when two or more forms in a
program repeatedly show each other modally (SHOW 1).
- Out of stack space.
- Out of memory.
- Out of overlay stack space.
CAUSE
This can happen even if you unload the form, which in turn shows the next
form. A form is not actually unloaded by the Unload statement until all its
event procedures return (End Sub or Exit Sub). Showing a form modally
suspends execution and, like a procedure call, maintains information on the
stack. Further explanation is given in the MORE INFORMATION section below.
WORKAROUNDS
- Show the forms non-modally (SHOW 0). It is acceptable practice to have
forms show each other non-modally.
- Do not have modal forms call each other continually. Instead, have an
initial form call all the other forms. Think of this initial form
(probably your startup form) as your foundation with all other forms
called from the foundation.
Additional query words: 1.00 2.00 3.00 B_VBMSDOS
Keywords: kbprb KB103461