|
-
Sep 5th, 2007, 09:56 AM
#1
Thread Starter
Addicted Member
[2005] MDI & MDI Child Forms Menu's in VB2005
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.
-
Sep 5th, 2007, 01:54 PM
#2
Re: [2005] MDI & MDI Child Forms Menu's in VB2005
In .net mdi child menus should merge with the parent menus rather than just replace them. Look at the AllowMerge Property of the menu strip and the MergeAction and MergeIndex properties of the individual menu items.
HTH
kevin
Process control doesn't give you good quality, it gives you consistent quality.
Good quality comes from consistently doing the right things.
Vague general questions have vague general answers. A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.
______________________________ Last edited by kebo : Now. Reason: superfluous typo's
-
Sep 6th, 2007, 06:20 AM
#3
Thread Starter
Addicted Member
Re: [2005] MDI & MDI Child Forms Menu's in VB2005
Hi,
I done this example and after i run this:
For Each menuItem As ToolStripMenuItem In MenuStrip.Items
menuItem.Enabled = False
menuItem.Visible = False
Next
Still when i click a shortcut that i have in this menu it still working the short cut.
How can i prevent that this menu can't work?
-
Sep 6th, 2007, 09:53 AM
#4
Re: [2005] MDI & MDI Child Forms Menu's in VB2005
well I don't know.... Are you merging menu's? If so, disabling menu items on the main form does not disable any merged menus that are contain by a child form.
kevin
Process control doesn't give you good quality, it gives you consistent quality.
Good quality comes from consistently doing the right things.
Vague general questions have vague general answers. A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.
______________________________ Last edited by kebo : Now. Reason: superfluous typo's
-
Sep 6th, 2007, 10:18 AM
#5
Thread Starter
Addicted Member
Re: [2005] MDI & MDI Child Forms Menu's in VB2005
Hi,
I am not merging menu's.
-
Sep 6th, 2007, 10:57 AM
#6
Re: [2005] MDI & MDI Child Forms Menu's in VB2005
 Originally Posted by yulyos
Hi,
I done this example and after i run this:
For Each menuItem As ToolStripMenuItem In MenuStrip.Items
menuItem.Enabled = False
menuItem.Visible = False
Next
Still when i click a shortcut that i have in this menu it still working the short cut.
How can i prevent that this menu can't work?
I am a bit confused at this point. If you are setting the menu visible property to false, then how can you click on the menu?
If however you are trying access the menu's click event from somewhere else in the code, then disabling the object and setting the visible property to false does not disable the routine that gets run when the event occurs, it simply allows the event to never occur.
kevin
Process control doesn't give you good quality, it gives you consistent quality.
Good quality comes from consistently doing the right things.
Vague general questions have vague general answers. A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.
______________________________ Last edited by kebo : Now. Reason: superfluous typo's
-
Sep 6th, 2007, 11:16 AM
#7
Thread Starter
Addicted Member
Re: [2005] MDI & MDI Child Forms Menu's in VB2005
Hi,
For Each menuItem As ToolStripMenuItem In MenuStrip.Items
menuItem.Enabled = False
menuItem.ShortcutKeys = False
Next
I'm useing Shortcut Ctrl+Z
-
Sep 6th, 2007, 11:39 AM
#8
Re: [2005] MDI & MDI Child Forms Menu's in VB2005
ok..I understand now....
Just by disabling the top level menu item, does not disable the child menu item. You need to disable the menus sub items as well.
kevin
Process control doesn't give you good quality, it gives you consistent quality.
Good quality comes from consistently doing the right things.
Vague general questions have vague general answers. A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.
______________________________ Last edited by kebo : Now. Reason: superfluous typo's
-
Sep 6th, 2007, 11:43 AM
#9
Thread Starter
Addicted Member
Re: [2005] MDI & MDI Child Forms Menu's in VB2005
Hi,
How can I do it?
Can you send an example?
-
Sep 6th, 2007, 11:48 AM
#10
Re: [2005] MDI & MDI Child Forms Menu's in VB2005
It's just like disabling any other menu item. If the name of the item is SubMenuItem then use
Code:
SubMenuItem.enable=false
kevin
Process control doesn't give you good quality, it gives you consistent quality.
Good quality comes from consistently doing the right things.
Vague general questions have vague general answers. A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.
______________________________ Last edited by kebo : Now. Reason: superfluous typo's
-
Sep 7th, 2007, 06:25 AM
#11
Thread Starter
Addicted Member
Re: [2005] MDI & MDI Child Forms Menu's in VB2005
Hi,
How I add to the next code that also SubItems in the MenuStrip will be Enabled = False
For Each menuItem As ToolStripMenuItem In MenuStrip.Items
menuItem.Enabled = False
Next
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|