In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

Trapping ESC key

Xailer professional forum in English
Responder
Giuseppe Bogetti
Mensajes: 281
Registrado: Vie Ago 04, 2006 4:58 pm

Trapping ESC key

Mensaje por Giuseppe Bogetti »

Hi,
To trap ESC key during an editing session, do I have to edit the OnKeyDown
event of all involved controls ?
OR Is there a Form event that do this ?
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9440
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Trapping ESC key

Mensaje por ignacio »

Giuseepe,
If you just wan to to close the form if the ESC key is pressed you just need
to set the property nBorderStyle to bsDIALOG.
ESC keys BTW can be trapped on the OnKeyDown event of any control, or event
at the Form level:
oForm:OnKeyDown.
The event is first routed on the control that generates it, and then is
routed to all its containers. If you want to stop that flow just return 0 on
the Control:OnKeyDown event.
Regards,
"Giuseppe Bogetti" <orangesocks@bgsoft.it> escribió en el mensaje
news:bz3yttpjgin4$[email=.l8zxnemjwmr1.dlg@40tude.net...].l8zxnemjwmr1.dlg@40tude.net...[/email]
> Hi,
>
> To trap ESC key during an editing session, do I have to edit the OnKeyDown
> event of all involved controls ?
>
> OR Is there a Form event that do this ?
>
> --
> Best regards,
>
> Giuseppe Bogetti
> B.G. Soft
> Cuneo - Italy
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
InvalidAccount
Mensajes: 53
Registrado: Vie Mar 04, 2005 9:58 am

Trapping ESC key

Mensaje por InvalidAccount »

Giuseepe,
If you just wan to to close the form if the ESC key is pressed you just need
to set the property nBorderStyle to bsDIALOG.
ESC keys BTW can be trapped on the OnKeyDown event of any control, or event
at the Form level:
oForm:OnKeyDown.
The event is first routed on the control that generates it, and then is
routed to all its containers. If you want to stop that flow just return 0 on
the Control:OnKeyDown event.
Regards,
"Giuseppe Bogetti" <orangesocks@bgsoft.it> escribió en el mensaje
news:bz3yttpjgin4$[email=.l8zxnemjwmr1.dlg@40tude.net...].l8zxnemjwmr1.dlg@40tude.net...[/email]
> Hi,
>
> To trap ESC key during an editing session, do I have to edit the OnKeyDown
> event of all involved controls ?
>
> OR Is there a Form event that do this ?
>
> --
> Best regards,
>
> Giuseppe Bogetti
> B.G. Soft
> Cuneo - Italy
Giuseppe Bogetti
Mensajes: 281
Registrado: Vie Ago 04, 2006 4:58 pm

Trapping ESC key

Mensaje por Giuseppe Bogetti »

Thanks
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy
Giuseppe Bogetti
Mensajes: 281
Registrado: Vie Ago 04, 2006 4:58 pm

Trapping ESC key

Mensaje por Giuseppe Bogetti »

Thanks
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy
Responder