Page 1 of 1
Capture key
Posted: Sat Jul 25, 2009 7:51 pm
by jouhmg
Hi:
How can capture the key used to exit a textbox (PASSWORD)?
I tested with:
ON LOSTFOCUS {|| If( LastKey() = K_ESC, ControlEscape(), Validar Acceso(cPass)) }
and does not work.
TIA
jouhmg
Re: Capture key
Posted: Sun Jul 26, 2009 7:38 am
by Rathinagiri
IMHO, Windows API provides total control to the "textbox". We can capture particular key pressing event only for a window container as a whole.
If we want to process Esc key sequence separately, we can use the following:
ON KEY <Key>
[ OF <ParentWindow> ]
ACTION <ActionProcedureName> | <bBlock>
Re: Capture key
Posted: Sun Jul 26, 2009 5:20 pm
by jouhmg
English by Google
*************
Hi:
I solved by replacing:
ON KEY ESCAPE OF...
...
...
ON LOSTFOCUS {|| If( LastKey() = K_ESC, ControlEscape(), ValidarAcceso(cPass)) }
by:
ON KEY ESCAPE OF...
...
...
ON ENTER {|| ValidarAcceso(cPass) }
Thank you very much for responding.
jouhmg