[SOLVED]C# and VB Menustrip

Discussion in 'Mixed Languages' started by QuantumBug, Aug 23, 2012.

  1. QuantumBug

    QuantumBug MDL Developer

    Mar 7, 2012
    1,473
    1,292
    60
    #1 QuantumBug, Aug 23, 2012
    Last edited: Aug 24, 2012
    Does anyone know where I can get the main menu below? Click to enlarge...

    menu.png

    I see this menu is quite popular, but when I create a Menustrip in VB or C# it gives me this ugly flat thing and I'm trying to update the Enhanced Decryptors UI in WinTK.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Calistoga

    Calistoga MDL Senior Member

    Jul 25, 2009
    420
    198
    10
    Agreed, the MenuStrip looks absolutely hideous.

    It's been a while since I used it, but I believe the MainMenu class is what you're looking for.
     
  3. QuantumBug

    QuantumBug MDL Developer

    Mar 7, 2012
    1,473
    1,292
    60
    #3 QuantumBug, Aug 23, 2012
    Last edited: Aug 24, 2012
    (OP)
    Castiloga, you are a legend. Just what I wanted.

    menucomplete.jpg
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Josh Cell

    Josh Cell MDL Developer

    Jan 8, 2011
    3,519
    7,097
    120
    Yep. MainMenu control loads the API resources to implement the menu on the GUI.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. QuantumBug

    QuantumBug MDL Developer

    Mar 7, 2012
    1,473
    1,292
    60
    #5 QuantumBug, Aug 24, 2012
    Last edited: Aug 24, 2012
    (OP)
    I do remember you saying something about the Mainmenu control before, Josh. Annoying thing is I can't see why they don't just impliment it as a ready made control for the toolbox.

    Is there any way I can draw this menu onto the designer before application runtime? At the moment it's being drawn on the form load event.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Josh Cell

    Josh Cell MDL Developer

    Jan 8, 2011
    3,519
    7,097
    120
    #6 Josh Cell, Aug 25, 2012
    Last edited by a moderator: Apr 20, 2017
    Personally I edit this context on FormDesigner class removing this red property:

    Code:
    this.mainMenu1 = new System.Windows.Forms.MainMenu(this.components);
    Then the menu doesn't depends of the form controls and it not releases when exit.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...