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:
00174764
Views:
24
>>>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( ..., ...)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform