Página 1 de 1

Using ESC key

Publicado: Jue Jul 06, 2006 3:59 pm
por Giuseppe Bogetti
Hi,
I've a MdiChild form which I would like to be able to close using the ESC
key. So I added the following code
METHOD FormKeyUp( oSender, nKey, nFlags ) CLASS TSerDoc
IF ( nKey == VK_ESCAPE )
::Close()
ENDIF
RETURN Nil
From this MdiChild I open a Modal Dialog to perform data editing.
If I press the ESC key on that form the key is also sent to the MdiChild
form causing it to close.
What am I doing wrong ?
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy