BUG: ZOrder and Aligned Controls

Last reviewed: October 8, 1996
Article ID: Q143404
The information in this article applies to:
  • Standard, Professional, and Enterprise Editions of Microsoft Visual Basic, 16-bit and 32-bit, for Windows 4.0

SYMPTOMS

Placing a control such as a command button on top of an aligned OCX control at design time will cause the Command button to fall to the bottom of the ZOrder at run time and become invisible.

MORE INFORMATION

Steps to Reproduce Problem

  1. Start Visual Basic or from the File menu, choose New Project (ALT, F, N).

  2. Add a Toolbar to Form1.

  3. Add a Command button on top of the Toolbar1.

  4. Run the Program. Note that the Command button disappears.

WORKAROUND

Invoke the ZOrder method of the Command button in Form_Load event as in the sample code below:

   Private Sub Form_Load()
       Command1.ZOrder 0
   End Sub

STATUS

Microsoft has confirmed this to be an issue in Microsoft Visual Basic version 4.0 for Windows. We are researching this problem and will post new information here in the Microsoft Knowledge Base.


Additional reference words: 4.00 vb4win vb4all
KBCategory: kbusage kbbuglist
KBSubcategory: PrgCtrls


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: October 8, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.