Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
On esc?
Message
From
18/05/1998 15:30:42
Ryan Hirschey
Federal Reserve Bank of New York
New York City, New York, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00100175
Message ID:
00100181
Views:
40
>vfp 3.0 win 95
>
>I have a browse from that I would like to add
>ON ESC and have it release the form, everything
>that I have read tells you to "DO" a function.
>
>Is there a way to just have it release the form?
>
>Thanks and have a great day!
See the VFP help file for ON ESCAPE (and its example)

ON ESCAPE Command

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

Syntax

ON ESCAPE
[Command]

Arguments

Command Specifies the Visual FoxPro command to execute. After the command executes, program execution resumes on the line immediately following the program line that was executing when you pressed ESC. However, if a procedure specified with ON ESCAPE includes RETRY, the program line that was executing when you pressed ESC executes again.

Remarks

Typically, ON ESCAPE uses DO to execute a procedure.

If both ON ESCAPE and ON KEY are in effect and you press ESC, Visual FoxPro executes the command specified with ON ESCAPE.

Use ON ESCAPE without a command to cause no command to execute when ESC is pressed (the default).

Note Visual FoxPro doesn’t execute an ON ESCAPE routine if SET ESCAPE is OFF.

You can call the forms release method in the procedure referenced in the on esacpe clause
Ryan Hirschey
Previous
Reply
Map
View

Click here to load this message in the networking platform