BUG: SSTab Is Locked When on Modal Form Shown at Load Time

Last reviewed: September 25, 1997
Article ID: Q149274
4.00    | 4.00
WINDOWS | WINDOWS NT kbprg kbbuglist

The information in this article applies to:

  • Standard, Professional, and Enterprise Editions of Microsoft Visual Basic, 16-bit and 32-bit, for Windows, version 4.0

SYMPTOMS

Showing a modal form in the Form_Load event of a different form causes any SSTab controls on the modal form to ignore all mouse and keyboard commands. This problem occurs with both the 16-bit and 32-bit SSTab OCXs.

WORKAROUND

This problem occurs only when the tab control is on a form that is shown modally during the load event of another form. To avoid this problem, either show the form non-modally, or show the form modally, but in an event other than the Form_Load event of the first form. Alternatively, one can emulate the appearance of showing the second form modally using a scheme similar to the one outlined below, although any code placed in the Form_Load event will be executed because execution will not pause when the second form is shown. This should be taken into account if code is written using this method. The following code fragment makes the first form invisible and then shows the second form. When the second form is unloaded, one line of code in the Unload event of the second form makes the first form visible again.

   ' On Form1
   Private Sub Form_Load()
      Form1.Visible = False
      Form2.Show
   End Sub

   ' On Form2
   Private Sub Form_Unload()
      Form1.Visible = True
   End Sub

STATUS

Microsoft has confirmed this to be an issue in the Microsoft products listed at the beginning of this article. Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce

  1. Start Visual Basic 4.0. Form1 is created by default.

  2. Add a second form to the project by selecting Form from the Insert menu.

  3. Add a single SSTab to Form2. Leave all properties as default.

  4. Add this code to the Form_Load event of Form1:

       Private Sub Form_Load()
          Form2.Show vbModal
       End Sub
    
    

  5. Press F5 or select Start from the Run menu to start the application. Form2 shows, but the tab control does not respond to any mouse or keyboard commands.


Additional reference words: 4.00 vb4win vb4all
KBCategory: kbprg kbbuglist
KBSubcategory: PrgCtrlsCus
Keywords : PrgCtrlsCus kbbuglist kbprg
Version : 4.00 | 4.00
Platform : NT WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 25, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.