
Popup Menu hides Main MDI Menu
Thanks for your prompt reply Randy. I have come up with a couple of
solutions by tinkering while waiting on the newsgroup. I will post these
solutions below to help others who might be trying to solve the same
problem. Thanks for sharing your knowledge.
The question is "How do I prevent the child form's popup menu from
clobbering the Parent form main menu ?"
The answer is. Don't have a menu on the child form.
Declare the Mainform as a Global. Put the popup submenu on the main form
under a hidden menu. Because the main form is global the child form can
access the hidden menu through the global MainForm. ie.
Call PopupMenu MainForm.mnuHidden
To show the hidden popup menu.
The other option I discovered was that it is possible to have a menu on a
UserControl.
Placing the user control on the Child form does not affect the menu on the
child form which in turn does not change the menu on the main form. A
property on the usercontrol allows access to the hidden popupmenu.
I am in the process of building a User Control specifically to handle a
generic popup menu.
This involves building the menu at run time and displaying it through
Properties of the User Control.
Mike.
Quote:
> What is the question? This behavior sounds correct.
> If you want a popup menu available to all forms, either place it on the
> parent menu and do not give any child windows menus, or place it on a
> non-MDI form that remains hidden throughout the app.
> --
> Randy Birch
> MVP Visual Basic
> Take the vb.net poll at:
> http://www.mvps.org/vbnet/
> http://www.mvps.org/ccrp/
> Please respond only to the newsgroups so all can benefit.
> : I have created a popup menu on a form in an mdi application.
> : When that form has the focus the menu on the Main form disappears.
> : I have seen the answer to this before but I can't find it.
> : Can someone please point me in the right direction ?
> :
> : Thanks, Mike.
> :
> :
> :