I don't see why you need such complicated code. To get Utility menu enabled/disabled automaticaly add SKIP FOR condition to the Utilities DEFINE PAD
... SKIP FOR (oMainLib.nOpen > 0)
>The application in question starts with a main menu displaying 'File', 'Go', 'Utilities', 'Help'.
>If any form is opened it is required to disable 'Utilities'. When a form is opened the main menu is deactivated and then reactivated disabling 'Utilities' (more than one form can be opened maintaining 'Utilities' disabled). When all forms are closed the main menu is deactivated and then reactivated enabling 'Utilities'. When the menu is deactivated the screen adjusts the height of the menu for a split second to fill the screen (the screen jumps up). When the menu is reactivated the screen readjusts the height of the menu (the rest of the screen jumps down the height of the menu). This is undesirable. How can this be prevented.
>
>Sample of code from within a Scan/EndScan to enable/disable 'Utilities':
>
>
<snip>
--sb--