Popup Menu hides Main MDI Menu 
Author Message
 Popup Menu hides Main MDI Menu

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.



Mon, 30 Jun 2003 08:53:13 GMT  
 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.
> :
> :
> :



Mon, 30 Jun 2003 14:12:29 GMT  
 Popup Menu hides Main MDI Menu


Quote:
> 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 ?

Create a hidden form or place it on your mainform, and make it invisible.

Another option (when you use popups a lot) is to create your own menu in the
source code when the mouse down is triggered:

AddMenu "Menu item 1", 1
AddMenu "Menu item 2", 2

RetVal = MyPopupMenu()

if RetVal = 1 then
etc.

Rene



Fri, 04 Jul 2003 18:33:53 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Using MDI Menus with child menu when child are hidden for popup

2. Using MDI Menus with child menu when child are hidden for popup

3. Programmatically hide any menus or popup menus on display

4. MDI Menus & Child Popup menus

5. MDI Menu with Child form Popup menu's

6. Popup menus on form called from a popup menu

7. show a shortcut menu / popup menu / context menu

8. Hooking into the main exploerer popup menu

9. how to hide main menu on form

10. Loop Thru Menu Items on main MDI form

11. Making Copy Of a MDI Main Form Menu for Child

12. Access 2000: add menu to main menu bar

 

 
Powered by phpBB® Forum Software