Ver Mensaje Individual
  #3  
Antiguo 23-02-2013
Avatar de nlsgarcia
[nlsgarcia] nlsgarcia is offline
Miembro Premium
 
Registrado: feb 2007
Ubicación: Caracas, Venezuela
Posts: 2.206
Reputación: 21
nlsgarcia Tiene un aura espectacularnlsgarcia Tiene un aura espectacular
Waldo,

Cita:
Empezado por Waldo
..en la form tengo activado a verdadero en keypreview, pero al presionar la tecla se genera el evento onkeyup, ejecuta ese código sin antes levantar el dedo de la tecla..
El orden secuencial de eventos de teclado es : OnKeydown (Al presionar una tecla), OnKeyPress (Al presionar una tecla con representación ASCII), OnKeyUp (Al liberar una tecla).

Revisa este link:
Cita:
Understanding and Processing Keyboard events in Delphi : OnKeyDown, OnKeyUp and OnKeyPress

http://delphi.about.com/od/objectpas...ard_events.htm
Cita:
Empezado por Delphi Help

Keyboard events are received at several levels:

1- The application level, with an OnMessage event of Application.
You will rarely need to intercept keystrokes at the application level, but it is important to know that this first level is available.

2- The "shortcut-key" level
When you specify a shortcut key, such as those provided as a property of menu items, the keystroke is intercepted before the form sees it.

3- The form level
The form contains a KeyPreview property that enables you to code "global" keystroke events.

4- The component level
When you program key-press event handlers at the component level, the component with focus intercepts the keystroke.
Espero sea útil

Nelson.

Última edición por nlsgarcia fecha: 23-02-2013 a las 20:08:34.
Responder Con Cita