Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I use the F10 key !!
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00174739
Message ID:
00174780
Views:
22
Hi guys,

Another workaround for this would be to redefine the F10 with an OKL. This way, it can be trapped for in the KeyPress event of the form (using the new key):
*Form.Init
on key label f10 keyboard '{SHIFT+F10}'

*KeyPress Event
if nKeycode = 96
    wait window 'F10 was pressed' nowait
    nodefault
endif
>>>>Hi everybody !
>>>>
>>>>I have a little problem with the F10 key... I would like the keyPress event to be called when I hit F10 as if I hit the F2 key.. For the moment, the F10 key only gives the focus to the menu and the KeyPress event is never called ! Is Windows 95 the only one can use the F10 key ???
>>>>
>>>>Any ideas ???
>>>>
>>>>Thanks in advance...and sorry for my poor english !
>>>>
>>>>Benoit Grenier.
>>>
>>>To invoke a keypress event via Function key, you would have to assign with
>>>
>>>ON KEY LABEL F10 thisform.myobject.keypress( nWhatKey, nAnyShiftAltCtrl )
>>>
>>>The object reference will need to be specific to the object unless you had a generic property on your form that was a pointer to the desired object to force a keypress.
>>>
>>>Ex: with a new property ObjectF10
>>>Thisform.ObjectF10 = Thisform.myObject
>>>
>>> or if within a pageframe
>>>
>>>Thisform.ObjectF10 = Thisform.myPageFrame1.Page1.myObject
>>>
>>>
>>>Then you could have the ON KEY LABEL =
>>>
>>>ON KEY LABEL F10 Thisform.ObjectF10.KeyPress( ..., ... ) && with whatever parameters would be required...
>>>
>>>Hope this helps, but use caution in case F10 is used for any other forms that may not have this custom property. You may want to check with PUSH KEY CLEAR, POP KEY commands to keep proper control...
>>
>>Can 'Thisform' be used under ON KEY LABEL? Probably not.
>
>I think you are correct Ed... Benoit, you may have to make some sort of global variable that points to the current form, then use that as your on key label...
>Ex:
>goF10Form = Thisform
>ON KEY LABEL F10 goF10Form.ObjectF10.KeyPress( ..., ...)
kenweber
GCom2 Solutions
Microsoft Certified Professional

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform