Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programming function keys
Message
From
11/10/1997 05:38:20
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00052580
Message ID:
00054151
Views:
33
>>pressing F2 = append new record
>> F4 = delete record
>> F5 = skip back
>> F6 = skip forward
>> F7 = goto bottom
>> F8 = goto top
>>etc. ...
>Marc,
>
>I would suggest that you NOT use ON KEY LABEL as those are intercommand interrupts and they could fire during other code running and cause major problems. I would suggest the following as a way of doing what you want.
>
>Use the keypress event of your formclass a=with KeyPreview set to .T. In the keypress event you can check for the keycodes (ascii numbers) for the keys you want trapped, issue a NODEFAULT and then call teh appropriate method of the form to do the work.
>
> * Form KeyPress
> LPARAMETERS nKeyCode, nShiftAltCtrl
> DO CASE
> CASE nKeyCode = -1 && F2
> NODEFAULT
> THISFORM.AddNew()
> CASE nKeyCode = -3 && F4
> NODEFAULT
> THISFORM.DelRec()
> CASE nKeyCode = -4 && F5
> NODEFAULT
> THISFORM.GoPrevious()
> CASE nKeyCode = -5 && F6
> NODEFAULT
> THISFORM.GoNext()
> CASE nKeyCode = -6 && F7
> NODEFAULT
> THISFORM.GoBottom()
> CASE nKeyCode = -7 && F8
> NODEFAULT
> THISFORM.GoTop()
> ENDCASE

Hi Jim,

Sorry for the late reply, been a bit busy lately :)

Your tip is coming the most near what i am loking for, i think.
After giving it a try (exactly your code) the result was zip-nothing---> a crash from the program

Am i missing something ??
Did i left something out ??

Marc
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform