Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 1020 Bytes

s4g231.md

File metadata and controls

25 lines (16 loc) · 1020 Bytes

SET ESCAPE, Set("Escape")

This command controls whether the Esc key interrupts program execution. It doesn't control whether Esc closes windows, chooses Cancel buttons, and so forth.

Usage

SET ESCAPE ON | OFF
cOnOrOff = SET("ESCAPE")

SET ESCAPE also controls ON ESCAPE. When ESCAPE is OFF, the escape handler specified with ON ESCAPE is ignored.

SET ESCAPE is only one part of turning off the Esc key in an application. It keeps the user from interrupting your program—generally a good thing to do. But it still leaves Esc available in forms and Browses and other places. This is usually what we want (once we've finished debugging the application, anyway).

If you really want to make Esc dead, dead, dead, SET ESCAPE OFF and issue ON KEY LABEL ESCAPE *, which tells FoxPro to execute a comment when the user presses Esc.

Example

SET ESCAPE OFF

See Also

Cancel, On Escape, On Key Label