Results 1 to 11 of 11

Thread: [2005] MDI & MDI Child Forms Menu's in VB2005

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Posts
    224

    [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.

  2. #2
    Still learning kebo's Avatar
    Join Date
    Apr 2004
    Location
    Gardnerville,nv
    Posts
    3,762

    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

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Posts
    224

    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?

  4. #4
    Still learning kebo's Avatar
    Join Date
    Apr 2004
    Location
    Gardnerville,nv
    Posts
    3,762

    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

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Posts
    224

    Re: [2005] MDI & MDI Child Forms Menu's in VB2005

    Hi,

    I am not merging menu's.

  6. #6
    Still learning kebo's Avatar
    Join Date
    Apr 2004
    Location
    Gardnerville,nv
    Posts
    3,762

    Re: [2005] MDI & MDI Child Forms Menu's in VB2005

    Quote 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

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Posts
    224

    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

  8. #8
    Still learning kebo's Avatar
    Join Date
    Apr 2004
    Location
    Gardnerville,nv
    Posts
    3,762

    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

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Posts
    224

    Re: [2005] MDI & MDI Child Forms Menu's in VB2005

    Hi,

    How can I do it?

    Can you send an example?

  10. #10
    Still learning kebo's Avatar
    Join Date
    Apr 2004
    Location
    Gardnerville,nv
    Posts
    3,762

    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

  11. #11

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Posts
    224

    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
  •  



Click Here to Expand Forum to Full Width