Adding Cleanup Code to a Menu System

You can tailor your menu system by adding cleanup code to it. Cleanup code typically contains code that initially enables or disables menus and menu items. When you generate and run the menu program, setup code and menu definition code is processed before cleanup code.

To add cleanup code to a menu system

  1. From the View menu, choose General Options.

  2. In the Menu Code area, select Cleanup and then choose OK.

  3. In the code window, type the appropriate cleanup code.

    Your changes are saved when you close the Menu Designer.

    Tip   If your menu is the main program in an application, include a READ EVENTS command in the cleanup code and assign a CLEAR EVENTS command to the menu command used to exit the menu system. This prevents your run-time applications from terminating prematurely.

See Also

Adding Setup Code to a Menu System | Controlling Menus at Run Time | Creating Custom Toolbars | Designing Menus and Toolbars | Compiling an Application