`
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 Printed November 21, 2024, 11:19 am This article has been viewed/printed 35296 times. |