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:
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.