MDI Child Form & Parent Form Menu Options

Posted on 2005-04-18
Last Modified: 2008-02-26
I have a dropdown menu on my MDI parent form which is visible across the top of the form.  I also created a menu on one of my MDI children forms.  The child menu is hidden and activated with a right click on certain controls.  However, when i show the child form with the hidden menu,  my parent menu is not visible.  Is there any way to resolve this?  My first thought is to put all of the hidden menu options from the child form on the menu currently on the parent form.  There are many many options and I was hoping to not have to re-key them all.

Any other ides how menu's on a MDI parent form and MDI child form can co-exist.  I noticed the negotiate menu property but this seems to apply to something else.
Question by:mlcktmguy
    LVL 39

    Accepted Solution


    No its not possible. you have to move all your menus in MDI child windows to MDI form.
    LVL 8

    Expert Comment

    set that menu items visible to false and in the chile form set it to visible. when you close the child form re-hide the menu.
    LVL 8

    Expert Comment

    sorry that wasn't very clear.

    Do as appari said. move the menu to the MDI Form. set it to hidden (menuitem.visible = false). on form load of the child form, set mdiform.menuitem.visible = true. on the Child form_Unload set the menu ito hidden again (mdiform.menuitem.visible = false). This will prevent the user from using the menu when it wont do them any good to have it.
    LVL 14

    Expert Comment

    by:Shiju Sasidharan
    Hi mlcktmguy

    Set Menu's in child form hidden and activate it with some control clicks as u said.

    >> However, when i show the child form with the hidden menu,  my parent menu is not visible.

    i tried it, its working
    i created menus in MDI (visible)  and in Child Form (invisible)
    and placed a command button on Child form

    Private Sub Command1_Click()

        PopupMenu mnuChlidFormMenuName
    End Sub


    LVL 39

    Expert Comment

    i dont know how you got it working, but its not working for me and this is documented on MSDN, see the following link
    main point says,
    In an MDI application, the menus for each child are displayed on the MDI form, rather than on the child forms themselves. When a child form has the focus, that child's menu (if any) replaces the MDI form's menu on the menu bar. If there are no child forms visible, or if the child with the focus does not have a menu, the MDI form's menu is displayed (see Figures 6.14 and 6.15).


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
    Introduction In a recent article ( for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now