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
- Start the Form Designer. In VBDOS.EXE, from the File menu, choose
New Project (ALT+F, N).
- Create two forms (Form1 and Form2).
- Enter the following code in Form1:
SUB Form_Click ()
Form2.SHOW 1
END SUB
- 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
- Run the program. Click Form1 to show Form2. Clicking Form1
causes a beep, as it should, because Form2 is modal.
- Click Form2. The forms are hidden.
- 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 :