BUG: Wrong Menu with Maximized MDI Child and No Control Box

Last reviewed: June 21, 1995
Article ID: Q121096
The information in this article applies to:

- Standard and Professional Editions of Microsoft Visual Basic for

  Windows, versions 2.0 and 3.0

SYMPTOMS

If you have a maximized MDI child form that doesn't contain a ControlBox (ControlBox = False), references to the MDI parent menus will control the wrong menu.

WORKAROUND

The only way to remedy this problem is to set the MDI child form's ControlBox property to True.

STATUS

Microsoft has confirmed this to be a bug in Microsoft Visual Basic versions 2.0 and 3.0 for Windows. 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 Visual Basic and create a new project.

  2. Add an MDI form to the project

  3. Add a menu to the MDI form using the following as a guide:

       Caption           Name
       --------------------------
       Menu1             mMenu1
       ....Menu1Item1    mMenu11
       Menu2             mMenu2
       ....Menu2Item1    mMenu21
    
    

  4. Add the following code for menu items:

       Sub mMenu11_Click ()
          Form1.Show
       End Sub
    
    

  5. Set Form1.MDIChild = True and Form1.ControlBox = False

  6. Add the following code to Form1:

       Sub Form_Click()
          MDIForm1!mMenu1.enabled = not MDIForm1!mMenu1.enabled
       End Sub
    
    

  7. From the Options Menu, choose Project Options. Change the startup form to MDIForm1

  8. Run the program. Choose Menu1Item1 from Menu1. The MDI child should appear. Click the MDI child form. This disables Menu1. Maximize the MDI child, and click it again. Now Menu2 is disabled.


Additional reference words: 2.00 3.00 buglist2.00 buglist3.00
KBCategory: kbprg kbbuglist
KBSubcategory: PrgCtrlsStd


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: June 21, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.