FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Strange behavior of ESC KEY
Posts: 44
Joined: Sat Jul 29, 2006 05:03 PM
Strange behavior of ESC KEY
Posted: Fri Apr 27, 2007 01:32 PM

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

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Strange behavior of ESC KEY
Posted: Fri Apr 27, 2007 08:21 PM

To prevent the user from exiting by using the Esc key:

ACTIVATE DIALOG oDlg;
VALID !GETKEYSTATE( VK_ESCAPE )

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion