Computer Hangs When Load Then Unload Form in Form_Load Event

ID: Q94937


The information in this article applies to:
  • Microsoft Visual Basic Standard and Professional Editions for MS-DOS, version 1.0


SYMPTOMS

If you load a form that has a menu item on it and then immediately unload it in the interpreter environment, the computer hangs (stops responding to This problem does not occur in a compiled program.


STATUS

Microsoft has confirmed this to be a bug in both 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

One way to work around the problem is to omit the menu bar from any form that you load and unload. Another way is to call a procedure from the Form_Load event of the first form instead of loading and unloading the form because the only reason you would want to load and unload a form in this manner is to execute the Form_Load event.

Steps to Reproduce Problem

  1. Start VBDOS.EXE.


  2. From the File menu, choose New Form... (FORM1.FRM).


  3. From the File menu in the Forms Designer (FD.EXE), choose New Form...


(FORM2.FRM).

  1. From the Window menu in FD.EXE, choose Menu Design Window.


  2. Add a top-level menu. Set the Caption property to test and the CtlName property to test.


  3. Close the Menu Design window.


  4. From the File menu, choose Exit, and save all changes.


  5. Add the following code to the Form_Click event procedure of Form1:
    
          Sub Form_Click ()
             Load Form2
             Unload Form2
          End Sub 


  6. Run the application. Click the Form1 form.


At this point, your computer hangs (stops responding). You have to reboot (restart) your computer.

Additional query words: VBmsdos buglist1.00 1.00

Keywords :
Version : MS-DOS:1.0
Platform : MS-DOS
Issue type :


Last Reviewed: December 8, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.