Link to home
Start Free TrialLog in
Avatar of mlcktmguy
mlcktmguyFlag for United States of America

asked on

MDI Child Form & Parent Form Menu Options

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.
ASKER CERTIFIED SOLUTION
Avatar of appari
appari
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wraith821
wraith821

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.
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.
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

'======================================

;-)
Shiju
shijusn:
i dont know how you got it working, but its not working for me and this is documented on MSDN, see the following link

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbconmenusinmdiapplications.asp
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).