Partager via


Event Handlers

These commands and functions make it possible for you to specify the action a program takes when a given event occurs.

Use

To

EVENTHANDLER( ) Function

Bind a COM server event to implemented interface methods on a Visual FoxPro object.

ON ERROR Command

Specify a valid expression or Visual FoxPro command to execute when an error occurs in code at run time.

ON ESCAPE Command

Specify a command that executes when you press the ESC key during program or command execution.

ON KEY LABEL Command

Specify a command that executes when you press a specific key or key combination or click the mouse button.

ON PAD Command

Specify the menu or menu bar that is activated when you choose a specific menu title.

ON SELECTION PAD Command

Specify the menu or menu bar that is activated when you choose a specific menu title.

ON SELECTION POPUP Command

Specify a command that executes when you choose any menu item from a specified menu or from all menus.

ON SHUTDOWN Command

Specify a command that executes when you try to exit Visual FoxPro, or Microsoft Windows.

ON( ) Function

Return the command assigned to each of these event-handling commands: ON ERROR, ON ESCAPE, ON KEY LABEL, or ON PAGE.

See Also

Reference

Form Designer

Other Resources

Programming

Language Categories