PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Assigning hotkeys
Assigning hotkeys
Iniciado por guest, 06,nov. 2015 09:03 - 2 respuestas
Publicado el 06,noviembre 2015 - 09:03
The following line in code works:

Button3..ShortCutKey = VK_F3

Pressing F3 executes the code in the button.

-----
The following does not work:

MyString is string = "VK_F3"
Button3..ShortCutKey = MyString

Nothing fires when I hit the F3 Key

-----
If it is hardcoded it works, but try to assign the value to a variable and it does not. Anybody got any thoughts on how to do this?

Thanks in advance, Art
Publicado el 06,noviembre 2015 - 09:10
Hi Art,

probably VK_F3 is a constant with a numeric value.

Try:

MyInt is int = VK-F3
Button3..ShortCutKey = MyInt

and I think it will fire the Button.
Publicado el 06,noviembre 2015 - 21:40
Stefan, that was the trick, what WD was looking for was an Int. Thanks for pointing me in the right direction.
Art