次の方法で共有


How to: Add 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 Commands to the menu command used to exit the menu system. This prevents your run-time applications from terminating prematurely.

See Also

Tasks

How to: Add Setup Code to a Menu System

How to: Control Menus at Run Time

Other Resources

Creating Custom Toolbars

Designing Menus and Toolbars

Compiling an Application