How to hide a menu completely?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sundayCoder
    New Member
    • Mar 2014
    • 10

    #1

    How to hide a menu completely?

    Hello,
    I'm coding a program that shows pictures.

    I have Settings-menu that has option to show pictures in fullscreen.
    The fullscreen item of the menu has submenu "Fit on fullscreen"

    If I don't have this submenu and I have

    Code:
    Me.MenuStrip1.Hide()
    Me.MenuStrip1.Enabled = False
    Me.MenuStrip1.IsDropDown.Equals(False)
    the above lines hide the menu completely.

    But if I have the mentioned submenu and I select Settings->Fullscreen, the menu doesn't disappear.

    My question is: How can I hide the complete menu when I have the mentioned submenu?

    The "fullscreen mode" is set like this:
    Code:
    Me.WindowState = FormWindowState.Maximized
    Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
    I use Visual Basic 2008 Express Edition.
  • Luk3r
    Contributor
    • Jan 2014
    • 300

    #2
    Did you remember to create an event based on the sub-menu item click?

    Comment

    • sundayCoder
      New Member
      • Mar 2014
      • 10

      #3
      I have just plain menuitem click code, no event based code. I'm kind of a beginner; could you help me out, how should I handle the menu item clicks?

      The MenuStrip1 disappers, but the selected menu remains.

      Comment

      • Luk3r
        Contributor
        • Jan 2014
        • 300

        #4
        Right, but in VB if you double-click the menu item or sub-menu item it should automatically create a click event for that item rather than the menustrip control.

        Comment

        Working...