Microsoft KB Archive/121096

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

Article ID: 121096

Article Last Modified on 12/9/2003

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Standard Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 2.0 Professional Edition
 * Microsoft Visual Basic 3.0 Professional Edition

-



This article was previously published under Q121096



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.



Steps to Reproduce Problem
 Start Visual Basic and create a new project. Add an MDI form to the project  Add a menu to the MDI form using the following as a guide:   Caption           Name --  Menu1             mMenu1 ....Menu1Item1   mMenu11 Menu2            mMenu2 ....Menu2Item1   mMenu21   Add the following code for menu items: Sub mMenu11_Click Form1.Show End Sub  Set Form1.MDIChild = True and Form1.ControlBox = False</li>  Add the following code to Form1: Sub Form_Click MDIForm1!mMenu1.enabled = not MDIForm1!mMenu1.enabled End Sub </li> From the Options Menu, choose Project Options. Change the startup form to MDIForm1</li> 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.</li></ol>

Additional query words: 2.00 3.00 buglist2.00 buglist3.00

Keywords: kbbug KB121096

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.