Estando en un txbrowse necesito conocer la pulsacion de una tecla de funcion "F1, F2,......F12" , el "Enter" etc.
Como puedo realizarlo ?????
Encontre los metodos KEYDOWN Y KEYCHAR pero no se como invocarlo.
Alguien puede ayudarme ???
Mil gracias.
Estando en un txbrowse necesito conocer la pulsacion de una tecla de funcion "F1, F2,......F12" , el "Enter" etc.
Como puedo realizarlo ?????
Encontre los metodos KEYDOWN Y KEYCHAR pero no se como invocarlo.
Alguien puede ayudarme ???
Mil gracias.
armandini wrote:Estando en un txbrowse necesito conocer la pulsacion de una tecla de funcion "F1, F2,......F12" , el "Enter" etc.
Como puedo realizarlo ?????
Encontre los metodos KEYDOWN Y KEYCHAR pero no se como invocarlo.
Alguien puede ayudarme ???
Mil gracias.
Gracias por tu ayuda.
hago una pequeña corrección:
oTXbrowse:bKeyDown := {|nk| if(nk = VK_RETURN, Mifuncion(), ;
if(nk = VK_F2, OtraFucnion(), nil )) }
Pero tal vez se vea mejor asÃ:
oTXbrowse:bKeyDown := {|nk| MiFuncion(nk)}
function MiFuncion(nk)
do case
case nk = VK_RETURN
funcion1()
case nk = VK_F2
funcion2()
...
endcase
return
![]()
GRACIAS POR EL INTERES. YA TENGO FUNCIONANDO BIEN LAS DISTINTAS FUNCIONES PRODUCTO DE LA EVALUACION DE LA VARIABLE NK.
DE TODAS FORMAS ME QUEDA UNA DUDA. AL MIRAR LA CLASE Y EL METODO RESPECTIVO ENCUENTRO ALLI DOS (2) PARAMETROS:
"NKEY" Y "NFLAGS". EL PRIMERO GUARDA EL VALOR DE LA TECLA PULSADA Y EL SEGUNDO QUE GUARDA Y PARA QUE SE PUEDE UTILIZAR ??????
lKeyData
Value of lParam. Specifies the repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag, as shown in the following table:
Value Description
0-15 Specifies the repeat count. The value is the number of times the keystroke is repeated as a result of the user holding down the key.
16-23 Specifies the scan code. The value depends on the original equipment manufacturer (OEM).
24 Specifies whether the key is an extended key, such as the right-hand ALT and CTRL keys that appear on an enhanced 101- or 102-key keyboard. The value is 1 if it is an extended key; otherwise, it is 0.
25-28 Reserved; do not use.
29 Specifies the context code. The value is always 0 for a WM_KEYDOWN message.
30 Specifies the previous key state. The value is 1 if the key is down before the message is sent, or it is 0 if the key is up.
31 Specifies the transition state. The value is always 0 for a WM_KEYDOWN message.