Page 1 of 1

Strange behavior of ESC KEY

Posted: Fri Apr 27, 2007 1:32 pm
by Arindam
Hi Eeverybody,

The finding problem is:

1) If I press the ESC key in get field, it is behaved like Enter key. If I check with Lastkey(), the return value is 13, instead of 27.

2) In normal case if I press Enter key, in any get field, the cursor moved to next get field. But if I press ESC key, the return value is 13 and active window goes off.

What is the solution?

With regards,
Arindam

Posted: Fri Apr 27, 2007 8:21 pm
by James Bott
To prevent the user from exiting by using the Esc key:

ACTIVATE DIALOG oDlg;
VALID !GETKEYSTATE( VK_ESCAPE )