MDI & MDI Child Forms Menu's in VB2005

yulyos

Well-known member
Joined
Jun 4, 2004
Messages
67
Location
Israel
Programming Experience
5-10
Hi,

How Do You Coordinate MDI & MDI Child Forms Menu's in VB2005

In VB6 when you launced a MDI Child form, it's menu would appear in it's MDI Form's menu space. NOW, it Adds to the MDI Forms Menu Area.

How can I Turn Off the MDI Form Menu before Launching the MDI Child Form?

Remember, I want to restore it when returning from the Child Form Back to the MDI Main Form.
 
If you type menustrip into the local MSDN Library index the first topic listed is merging. Clicking leads to two titles, the first of which is entitled "How to: Set Up Automatic Menu Merging for MDI Applications". Sound useful?
 
Hi,

I have an Mdi form and he have a MenuStrip in the properties I define the
AllowMerge=False
In the SubMenus of the MenuStrip there is some ShortcutKeys

I have also Child Form name Form1 and also he have a MenuStrip in the properties I define the AllowMerge=False
In the SubMenus of the MenuStrip there is some shortcutKeys

In the Parent Form and also in the Child Form I have some same ShortcutKeys, example: Ctrl+Z

I wrote the next code in the Parent Form:
For Each menuItem As ToolStripMenuItem In MenuStrip.Items
menuItem.Enabled = False
Next
'
Dim f As New Form1
f.MdiParent = Me
f.Show()

When I'm loading the Child Form from the Parent Form and when I'm pressing Ctrl+Z I get the result of the action of the Parent Form

Why?
 
Disabling all menu items sounds as such a bad thing to do.
 
I don't even know what you're asking for. Are you actually saying, without actually saying, that you want to disable every item and subitem in the menu? If so then, as JohnH says, that is just a bad idea. Some people have a problem helping someone do something that they know is a bad idea. I post on these forums to help people become better programmers. helping you write bad code doesn't achieve that so it's not something I'm going to do. If you could clearly state what it is that you're trying to achieve then we could help you come up with a proper solution, but I don't really know exactly what you're trying to achieve. I know it has something to do with menus in MDI child forms but I'm not sure exactly what. I'm fairly sure that you either want them to merge or not merge, and maybe some parent items to be hidden while a child form is displayed, but I'm really not sure. I know English is not your native language but I still don't think that you've done your best to provide a clear explanation of your aim. Without that we are really only guessing and that's a great way to watse our time providing irrelevant information.
 
Concerning MDI

Concerning MDI

I'm not to sure what your asking, but I can give some examples.

In VB6 mdi was handled via property's during build time. When .NET was created it became a coded property, much like the allowdrop on picture boxes.

to open a mdi child in a mdi parent use this:

frmForm.mdiparent = me
frmForm.show

to open a mdi child from another mdi child

frmForm2.mdiparent = frmMain.Activewindow
frmForm2.show

^-^ Feel free to send me a PM as I enjoy using MDI a lot and I'm sure I can help you.
 
Back
Top