BUG: Forms Lose Order and Modality after SCREEN.SHOW

ID: Q98197


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


SYMPTOMS

When you hide all forms and then show all forms using SCREEN.HIDE and SCREEN.SHOW, two problems occur:

  • The z-order of the forms is not preserved correctly. In other words, the order in which forms overlap each other may change so that now a different form appears on top.


  • Modal forms incorrectly become non-modal.



WORKAROUND

To work around the problem with z-order, explicitly use SHOW to show each form in the order that you want them to appear after using SCREEN.SHOW.

To work around the problem with losing modality, use SHOW to show the form modally after using SCREEN.HIDE. This only works if there is only a single modal form.


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

  1. Start the Form Designer. In VBDOS.EXE, from the File menu, choose New Project (ALT+F, N).


  2. Create two forms (Form1 and Form2).


  3. Enter the following code in Form1:
    
       SUB Form_Click ()
          Form2.SHOW 1
       END SUB 


  4. Enter the following code in Form2.
    
       SUB Form_Click ()
          ' Form2.Hide      ' remove the comment to work around the problem
          SCREEN.HIDE
          SLEEP
          SCREEN.SHOW
          ' Form2.SHOW 1    ' remove the comment to work around the problem
       END SUB 


  5. Run the program. Click Form1 to show Form2. Clicking Form1 causes a beep, as it should, because Form2 is modal.


  6. Click Form2. The forms are hidden.


  7. Press a key to restore the forms. Form1 is incorrectly positioned on top of Form2, which has become non-modal.


Additional query words: VBmsdos buglist1.00 1.00

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


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