|
Rob -
I don't believe you can prevent a user from
pressing ESC to exit a form, so you have to do something else.
Here's what I do -
I set up the DONE button to execute Button.EEP
USING 1
I set up the CANCEL button to execute
Button.EEP USING 99
-- Button.EEP
SET VAR fButton = .%1 IF fButton = 1 THEN --User clicked on DONE so it will save the record SET VAR fFormDirty = 'N'
IF (ISTAT('FORM_DIRTY_FLAG')) = 1 THEN SET VAR fFormDirty = 'Y' SAVEROW ENDIF ENDIF
CLS
CLOSEWINDOW RETURN If the user clicks the Done button, then the value
of fButton is "1" otherwise, if they click Cancel or press the ESC, it remains
"0".
SET VAR fButton INTEGER = 0
EDIT USING formname WHERE yada yada
IF fButton = 0 THEN --User
Pressed ESC
run some dialog or something to confirm
whether or not they wanted to cancel or continue
IF they want to cancel THEN
SET VAR fButton =
99
ELSE
SET VAR fButton = 1
ENDIF
IF fButton = 99 THEN
run your cancel routine
ENDIF
IF fButton = 1 THEN
run your "done" command file
ENDIF
Sami
-----------------------------------------------------------
Sami Aaron Software Management Specialists 19312 W 63rd Terr Shawnee KS 66218 913-915-1971 http://www.softwaremgmt.com
|
- Disable [Esc] on Forms Rob Vincent
- Re: Disable [Esc] on Forms Bernard Lis
- Re: Disable [Esc] on Forms Rob Vincent
- Re: Disable [Esc] on Forms Bernard Lis
- Re: Disable [Esc] on Forms Sami Aaron
- Re: Disable [Esc] on Forms J. Stephen Wills
- Re: Disable [Esc] on Forms - Razzak's Reply A. Razzak Memon
- Re: Disable [Esc] on Forms - Razzak's Reply Ben Petersen
- Re: Disable [Esc] on Forms - Razzak's Reply A. Razzak Memon
- Re: Disable [Esc] on Forms DKauf22024
- Re: Disable [Esc] on Forms tellef
- Re: Disable [Esc] on Forms J. Stephen Wills
- Re: Disable [Esc] on Forms Ben Petersen
- Re: Disable [Esc] on Forms Alastair Burr
