FIX: No Menu Event with Maximized MDI Child

Last reviewed: October 30, 1997
Article ID: Q97135
2.00 WINDOWS kbprg kbbuglist

The information in this article applies to:

- Standard and Professional Editions of Microsoft Visual Basic for

  Windows, version 2.0

SYMPTOMS

A top level menu's click event on an MDI form isn't fired as it should be when the MDI child is maximized and a sub-menu item exists for that top level menu. There is no click event generated regardless of whether the menu is part of the MDI child or the MDI parent.

STATUS

Microsoft has confirmed this to be a bug in both the Standard and Professional Editions of Microsoft Visual Basic version 2.0 for Windows. This problem was corrected in Microsoft Visual Basic version 3.0 for Windows.

MORE INFORMATION

Steps to Reproduce Problem

  1. Start VB.EXE.

  2. Change the MDIChild property of Form1 to True.

  3. From the File menu, choose New MDI Form (ALT+F+I)

  4. From the Window menu, choose Menu Design (ALT+W+M), and add two menu items. Indent the second item once.

       Caption      Name
       -------      -----
       &Top Level   mTopLevel
       &SubMenu     mTopLevelSubMenu
    
    

  5. Add the following code to their respective event procedures:

       Sub mTopLevel_Click ()
          Form1.Print "TopLevel"
       End Sub
    
       Sub mTopLevelSubMenu_Click ()
          Form1.Print "SubMenu"
       End Sub
    
       Sub MDIForm_Load ()
          Form1.Show
       End Sub
    
    

  6. From the Run menu, choose Start.

  7. Select the Top Level menu item to see a message printed on Form1.

  8. Maximize Form1 and Select the Top Level menu item. A message should be printed but is not.


Additional reference words: buglist2.00 fixlist3.00 2.00 3.00
KBCategory: kbprg kbbuglist
KBSubcategory: PrgCtrlsStd
Solution Type : kbfix


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 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.