Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. MainMenu disappearing

MainMenu disappearing

Scheduled Pinned Locked Moved C#
designtestingbeta-testingquestionannouncement
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Chals
    wrote on last edited by
    #1

    Hi Folks, I have a MDI Parent form which has its own MainMenu. At design time everything is fine, but at run time the Main Menu disappears. After some testing, I found out that if the form's IsMDIContainer property is set to false, the Main Menu appears. If I set IsMDIContainer = true just before loading any MDI Child, the menu shows, but it wont merge with the Child menu items, besides, the MDiList of the parent wont update. I've even tried to create the Main menu in the Load event of the form, but its the same. Any suggestion? I've ran out of ideas here

    A 1 Reply Last reply
    0
    • C Chals

      Hi Folks, I have a MDI Parent form which has its own MainMenu. At design time everything is fine, but at run time the Main Menu disappears. After some testing, I found out that if the form's IsMDIContainer property is set to false, the Main Menu appears. If I set IsMDIContainer = true just before loading any MDI Child, the menu shows, but it wont merge with the Child menu items, besides, the MDiList of the parent wont update. I've even tried to create the Main menu in the Load event of the form, but its the same. Any suggestion? I've ran out of ideas here

      A Offline
      A Offline
      Ashok Dhamija
      wrote on last edited by
      #2

      While I am not sure of the various properties set by you for the menu items of the MDI form and Child form, I may add that generally speaking, by default, MDI parent forms add MDI child menus automatically. Two properties, "MergeType" and "MergeOrder", determine how individual menu items are handled during a menu merge and the relative position of each MenuItem in the newly-merged menu. You can set these properties on MenuItems individually or collectively to determine the items' presence and location within a menu merge. Also remember the use of the "MenuMerge" enumeration which has 4 members, namely, "Add", "MergeItems", "Replace" and "Remove". These members can create various combinations for the merged menus, and depending upon the selected option the merged menu may not show properly. So, you may like to check the values of "MergeType" and "MergeOrder" properties of menu items on the MDI Form and Child forms. Try using the value of the "MergeType" property as "Add" instead of "Replace" or "Remove" if the latter values are set in your code. This can be done at design time as well. If it does not help you, please try to give some more details of your problems.

      C 1 Reply Last reply
      0
      • A Ashok Dhamija

        While I am not sure of the various properties set by you for the menu items of the MDI form and Child form, I may add that generally speaking, by default, MDI parent forms add MDI child menus automatically. Two properties, "MergeType" and "MergeOrder", determine how individual menu items are handled during a menu merge and the relative position of each MenuItem in the newly-merged menu. You can set these properties on MenuItems individually or collectively to determine the items' presence and location within a menu merge. Also remember the use of the "MenuMerge" enumeration which has 4 members, namely, "Add", "MergeItems", "Replace" and "Remove". These members can create various combinations for the merged menus, and depending upon the selected option the merged menu may not show properly. So, you may like to check the values of "MergeType" and "MergeOrder" properties of menu items on the MDI Form and Child forms. Try using the value of the "MergeType" property as "Add" instead of "Replace" or "Remove" if the latter values are set in your code. This can be done at design time as well. If it does not help you, please try to give some more details of your problems.

        C Offline
        C Offline
        Chals
        wrote on last edited by
        #3

        Yes, I also played with that. I have 3 MDI child forms at the moment, one of them has NO menu at all, and the other two have 'MergeType' set to Add, each of them with the appropiate MergeOrder value, but the problem is the same, the Menu from the Main form keeps disappearing. Anyway, after a couple of hours more trying to fix it, I decided to use the MenuBar provided in the user interface suite we generally use (Janus controls). I am reluctant to use them because these fancy UI controls are memory swallowers, but for this MDI problem they work, so to hell with VS MainMenus. Thanks for the reply though, Dr Ashok.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups