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
- 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
- Add the following code to Form1:
Sub Form_Click()
MDIForm1!mMenu1.enabled = not MDIForm1!mMenu1.enabled
End Sub
- From the Options Menu, choose Project Options. Change the startup
form to MDIForm1
- 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 :