Trap F10 in the KeyPress()

Is there any way I can trap for an F10 in a keypress event?
We have a legacy app which is using ON KEY LABEL to capture an F10 key press. I can't trap this in the KeyPress, I assume becasue it has the same key code as ALT which KeyPress can't cope with.
Changing from F10 to another key is not an option :(
One thing I can do is have a macro in effect to convert an F10 to something else and trap that in the KeyPress.
Is there a nice way I can do this? VFP8 SP1.
Thanks,
Craig.
[510 byte] By [CraigMcGuff] at [2008-2-10]
# 1
Hi Craig,
In VFP 8 the one possibility is to use ON KEY LABEL to capture the key stroke and then use the KEYBOARD command to map it to something different. In the KeyPress event check for that other key (I use CHR(255) for this):
ON KEY LABEL F10 KEYBOARD Chr(255)

In VFP 9 you can use BINDEVENT() to capture the key stroke at the API level before VFP processes it.
ChristofWollenhaupt at 2007-9-8 > top of Msdn Tech,Visual FoxPro,Visual FoxPro General...