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

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 query words: 2.00 3.00 buglist2.00 buglist3.00

Keywords :
Version :
Platform :
Issue type :


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