BUG: Chain w/ Modal Form or MsgBox in Menu May Hang Computer
ID: Q94664
|
The information in this article applies to:
-
Microsoft Visual Basic Standard and Professional Editions for MS-DOS, version 1.0
SYMPTOMS
Chaining to a form that has a MsgBox or that shows a modal form in a menu
click event may cause the computer to hang (stop responding). This problem
occurs only when using CHAIN to chain from a compiled program that requires
a run-time module (BC.EXE option /O not used).
WORKAROUND
To work around the problem, use one of the following techniques:
- Compile with BC /O (stand-alone)
- Use the RUN statement instead of CHAIN. Note that COMMON variables
are not preserved so you must save the information in a disk file.
- Use overlays instead of CHAIN.
STATUS
Microsoft has confirmed this to be a bug in the Standard and
Professional Editions of Microsoft Visual Basic version 1.0 for MS-DOS.
We are researching this problem and will post new information here in the
Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Steps to Reproduce Problem
- Start VBDOS.EXE.
- From the File menu, choose New Form... (FORM1.FRM).
- Exit the Form Designer, and save all changes.
- Add the following code to the Form_Click event procedure of Form1:
Sub Form_Click
MsgBox "In Form1"
Chain "Form2"
End Sub
- From the Run menu, choose Make EXE file... and create an executable .EXE
file that requires a run-time module.
- Start a new project and create another form using the same process. Name
the new form FORM2.FRM.
- In the Forms Designer, from the Window menu, select the Menu Design
window.
- Create a top-level menu with Caption = menu1 and CtlName = menu1.
- Close the Menu Design window.
- Exit the Form Designer, and save all changes.
- Add the following code to the menu1_Click event procedure of Form2:
Sub menu1_Click
MsgBox "In FORM2"
End Sub
- From the Run menu, choose Make EXE file... and create an executable
.EXE file that requires a run-time module.
- Exit from the VBDOS.EXE environment.
From the MS-DOS prompt, run FORM1.EXE. Click the form to bring up the
message box. Choose the OK button. The chains to FORM2.EXE. Choose the menu
item. When you click the OK button to close the MsgBox, the computer hangs
(stops responding).
This does not occur if you compile for a standalone (BC /O) program.
Additional query words:
VBmsdos buglist1.00 1.00
Keywords :
Version : MS-DOS:1.0
Platform : MS-DOS
Issue type :