JavaScript Editor JavaScript Editor     JavaScript Debugger

Previous Section Next Section

Main Page

Showing and Hiding Menu Items

To show and hide menu items, you can use their Visible property (they don't have Show or Hide methods). Here's an example from the Menus example on the CD-ROM; when you select the item with the caption "Item 4" from the submenu system, the program will hide the menu item with the caption "Item 1":

Private Sub MenuItem8_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles MenuItem8.Click
    MsgBox("Hiding item 1...")
    MenuItem5.Visible = False
End Sub
Previous Section Next Section




JavaScript Editor Free JavaScript Editor     JavaScript Editor