Code: Select all | Expand
::xDlg:bValid := { || iif( GetKeyState( VK_ESCAPE ), ::lHitEsc := .T., Nil ), ::lCanClose }
lCanClose - if dialog can be closed
lHitEsc - if user hit ESC, this will be used by routine
This solves my current need.
Code: Select all | Expand
::xDlg:bValid := { || iif( GetKeyState( VK_ESCAPE ), ::lHitEsc := .T., Nil ), ::lCanClose }
Code: Select all | Expand
::xDlg:bKeyDown := { | nKey | ;
iif( nKey == VK_ESCAPE, ::lHitEsc := .T., Nil ), ;
MsgExclamation( iif( ::lHitEsc, "ESC", "other" ) ) }