Login
`
Templates, Tools and Utilities
|
||
Icetips Article
Back to article list
Search Articles
Add Comment
Printer friendly
Direct link
Par2: Trapping ESC key on a window 1999-03-22 -- Tony York Here is what you do
1. In the window editor, right mouse button on the window object and select Alerts.
2. Add an alert of EscKey. You will have to write it, as pressing the keys will not
generate the code for you.
3. In the Window event handling - PreAlert place the command cycle.
4. In the Window event handling - AlertKey place a command like
CancelPressed = True or what ever code you wish. However if you use a form and
want to wait until the very end to see what response the user might make to a request
to save the data, then just the CancelPressed = True is best (declare as a byte in the
data section) and place your other code in the after closing window embed using if
statements like
if CancelPressed then
if OriginalRequest = InsertRecord then
if LocalResponse = RequestCancelled
!code
end
end
end
Today is November 21, 2024, 7:41 am This article has been viewed 35296 times.
|
|