1. Create a new magic menu item called "Window" in the main menu of the
custom menu.
Name: Window
Type: Magic
Magic Item: Window
Command Type: Null
Label: (blank) do not put a label on this menu item
NOTE: make sure you completely blank out the 'Label' field, otherwise
the 'Window' menu will be disabled but not hidden.
Add the bellow code in When-New-Form-Instance trigger
SET_MENU_ITEM_PROPERTY('MAIN_MENU.WINDOW', DISPLAYED, PROPERTY_FALSE);
SET_MENU_ITEM_PROPERTY('MAIN_MENU.WINDOW', ENABLED, PROPERTY_FALSE);