Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Menu from MDI child form hides menu from MDI parent. Why?!?

Status
Not open for further replies.

BogdanMBM

Programmer
Aug 6, 2003
213
RO
Hi,

I realise this is a stupid question, but I have a situation here:
- I've created a project with a MDI form & a child form (with MDIChild prop. set to TRUE).
- I have a menu bar on the MDI form (that's the main menu of the application)
- I want to have a context menu on the child form so I created a menu on the child form with the Visible prop. set to False (it only pops up with Popupmenu command on MouseDown event on one of the ListView controls on the child form).
The problem is that it makes the main menu (from the MDI form) to dissapear. How can I owercome this?
One solution would be to create all my context menus in the main (MDI) form and set their Visible properti to false; but this would mean to use a lot of public variables in my mdi child forms (to use them in the Click events of the ctx menus) and I realy don't want that...
Is there any way (a prop. to be set) to make the menus from the child forms not to hide the menu bar in the MDI parent?

Thanks a lot!
 
Heh! Never mind, guys. I think my brain stopped (for an hour or soo) [blush]

I'll put all my context menus in the menu bar of the MDI form (Visible = False) and on the click event of each one I'll just call the appropriate function from the MDI child form that pops up the context menu.

Thanks anyway, heh!... [blush]

Hope I've been helpful,
Bogdan Muresan.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top