?
Solved

MDI Child Form & Parent Form Menu Options

Posted on 2005-04-18
5
Medium Priority
?
750 Views
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.
0
Comment
Question by:mlcktmguy
  • 2
  • 2
5 Comments
 
LVL 39

Accepted Solution

by:
appari earned 500 total points
ID: 13812113

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

Expert Comment

by:wraith821
ID: 13812526
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.
0
 
LVL 8

Expert Comment

by:wraith821
ID: 13812543
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.
0
 
LVL 14

Expert Comment

by:Shiju Sasidharan
ID: 13812785
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
0
 
LVL 39

Expert Comment

by:appari
ID: 13812909
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).

0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses
Course of the Month13 days, 13 hours left to enroll

755 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