PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → F10 not detected
F10 not detected
Débuté par Patrick Thijs, 28 nov. 2004 17:11 - 5 réponses
Posté le 28 novembre 2004 - 17:11
Hello,
i'm writing an application where I need to be able to see wich Function Key has been pressed by the user.
The code to do this is as follows :
in the initialisation of the window
//captatie toetsen
Event("KnopGedrukt", "frmMain.*", WM_KEYDOWN)
the function is like this :
FUNCTION KnopGedrukt(Message,wParam,IParam)
IF bolNoKeyEvents = False THEN

SWITCH wParam

CASE 32
IF bolKlokLoopt = True THEN
bolKlokLoopt = False
ELSE
bolKlokLoopt = True
END
CASE 112
spinHomeScore..Value = spinHomeScore + 1
ledHome = spinHomeScore
CASE 113
spinGuestScore..Value = spinGuestScore + 1
ledGuests = spinGuestScore
.............

it works for all keys, but NOT for F10, is this a bug in WinDev, or am I overlooking something ?
best regards,
Patrick

Carmen
Posté le 28 novembre 2004 - 17:28
Hi Patrick,
maybe F10 is already used as a shortcut of another control?
A simple solution is to hide a button behind another control and define F10 or any other function key as a shortcut for that button. The button code executes whatever function you wish ..
Regards,
Guenter

Hello,
i'm writing an application where I need to be able to see wich Function Key has been pressed by the user.
The code to do this is as follows :
in the initialisation of the window
//captatie toetsen
Event("KnopGedrukt", "frmMain.*", WM_KEYDOWN)
the function is like this :
FUNCTION KnopGedrukt(Message,wParam,IParam)
IF bolNoKeyEvents = False THEN

SWITCH wParam

CASE 32
IF bolKlokLoopt = True THEN
bolKlokLoopt = False
ELSE
bolKlokLoopt = True
END
CASE 112
spinHomeScore..Value = spinHomeScore + 1
ledHome = spinHomeScore
CASE 113
spinGuestScore..Value = spinGuestScore + 1
ledGuests = spinGuestScore
.............

it works for all keys, but NOT for F10, is this a bug in WinDev, or am I overlooking something ?
best regards,
Patrick
Posté le 28 novembre 2004 - 17:55
Hi Guenter,
this works, thanks a lot for the quick answer, next time when i'm in Austria, i'll buy you a drink :-)
best regards,
Patrick
Hi Patrick,
maybe F10 is already used as a shortcut of another control?
A simple solution is to hide a button behind another control and define F10 or any other function key as a shortcut for that button. The button code executes whatever function you wish ..
Regards,
Guenter

Hello,
i'm writing an application where I need to be able to see wich Function Key has been pressed by the user.
The code to do this is as follows :
in the initialisation of the window
//captatie toetsen
Event("KnopGedrukt", "frmMain.*", WM_KEYDOWN)
the function is like this :
FUNCTION KnopGedrukt(Message,wParam,IParam)
IF bolNoKeyEvents = False THEN

SWITCH wParam

CASE 32
IF bolKlokLoopt = True THEN
bolKlokLoopt = False
ELSE
bolKlokLoopt = True
END
CASE 112
spinHomeScore..Value = spinHomeScore + 1
ledHome = spinHomeScore
CASE 113
spinGuestScore..Value = spinGuestScore + 1
ledGuests = spinGuestScore
.............

it works for all keys, but NOT for F10, is this a bug in WinDev, or am I overlooking something ?
best regards,
Patrick
Posté le 28 novembre 2004 - 18:22
Hi,
I think you have a typo, F10 is 121 and not 112. Use Keyconst.wl instead of numeric constants to avoid those errors.
Regards
Raimund
Hello,
i'm writing an application where I need to be able to see wich Function Key has been pressed by the user.
The code to do this is as follows :
in the initialisation of the window
//captatie toetsen
Event("KnopGedrukt", "frmMain.*", WM_KEYDOWN)
the function is like this :
FUNCTION KnopGedrukt(Message,wParam,IParam)
IF bolNoKeyEvents = False THEN

SWITCH wParam

CASE 32
IF bolKlokLoopt = True THEN
bolKlokLoopt = False
ELSE
bolKlokLoopt = True
END
CASE 112
spinHomeScore..Value = spinHomeScore + 1
ledHome = spinHomeScore
CASE 113
spinGuestScore..Value = spinGuestScore + 1
ledGuests = spinGuestScore
.............

it works for all keys, but NOT for F10, is this a bug in WinDev, or am I overlooking something ?
best regards,
Patrick



http://www.invitec.com
Posté le 28 novembre 2004 - 19:41
Hello Raimund,
thanks for your advice, but i didn't pasted al of the code, i was using 121 to detect F10, but it didn't work, when i pressed F10, there wasn't even an event fired.
greetz,
Patrick
Hi,
I think you have a typo, F10 is 121 and not 112. Use Keyconst.wl instead of numeric constants to avoid those errors.
Regards
Raimund
Hello,
i'm writing an application where I need to be able to see wich Function Key has been pressed by the user.
The code to do this is as follows :
in the initialisation of the window
//captatie toetsen
Event("KnopGedrukt", "frmMain.*", WM_KEYDOWN)
the function is like this :
FUNCTION KnopGedrukt(Message,wParam,IParam)
IF bolNoKeyEvents = False THEN

SWITCH wParam

CASE 32
IF bolKlokLoopt = True THEN
bolKlokLoopt = False
ELSE
bolKlokLoopt = True
END
CASE 112
spinHomeScore..Value = spinHomeScore + 1
ledHome = spinHomeScore
CASE 113
spinGuestScore..Value = spinGuestScore + 1
ledGuests = spinGuestScore
.............

it works for all keys, but NOT for F10, is this a bug in WinDev, or am I overlooking something ?
best regards,
Patrick



Carmen
Posté le 30 novembre 2004 - 14:14
F10 is a system key (to activate the menu).You can use WM_SYSKEYDOWN to capture it. Type WM_SYSKEYDOWN in google for more information.
Greetings,
Alex
Hello,
i'm writing an application where I need to be able to see wich Function Key has been pressed by the user.
The code to do this is as follows :
in the initialisation of the window
//captatie toetsen
Event("KnopGedrukt", "frmMain.*", WM_KEYDOWN)
the function is like this :
FUNCTION KnopGedrukt(Message,wParam,IParam)
IF bolNoKeyEvents = False THEN

SWITCH wParam

CASE 32
IF bolKlokLoopt = True THEN
bolKlokLoopt = False
ELSE
bolKlokLoopt = True
END
CASE 112
spinHomeScore..Value = spinHomeScore + 1
ledHome = spinHomeScore
CASE 113
spinGuestScore..Value = spinGuestScore + 1
ledGuests = spinGuestScore
.............

it works for all keys, but NOT for F10, is this a bug in WinDev, or am I overlooking something ?
best regards,
Patrick