Use the Visible property to determine whether menu items are hidden by default.
If the Visible property of a menu item is set to true, the menu item appears in the Menu painter's Tree and WYSIWYG views. If you want a menu item to be initially invisible, set the Visible property to false in the menu item's Properties view.
menuitem.Visible=TRUE