Hi Terry,
plese pardon me for jumping in. "so a method would have to be DOed"? I must have slept in my english classes at school, I was sure it was "so a method would have to be DOne"! :-)
>In the textbox gotfocus you could
>
ONKEY LABEL F8 MESSAGEBOX([F8 KEY PRESSED])
>this.value won't work with on key, so a method would have to be DOed!
>It could then be cleared in lostfocus.
>
>>Hello Foxperts,
>>
>>I'm trying to capture the F8 keystroke and use it to replace the contents of a character field with another string that was saved in a memvar. Here's the code I've placed in the KeyPress event-method of the textbox:
>>
LPARAMETERS nKeyCode, nShiftAltCtrl
>> WAIT "You Pressed "+TRANSFORM(nKeyCode) WINDOW NOWAIT
>>IF nKeyCode=-7
>> NODEFAULT
>> oRec_mem.bwk_PlaceName=m.PlaceName
>> This.Refresh()
>>ELSE
>> DODEFAULT(nKeyCode)
>>ENDIF
>>The
WAIT ... WINDOW
line shows me the nKeyCode for F7 and F9, but F8 returns nothing.
>>
>>UPDATE: F8 appeared to return nothing because an old
ON KEY LABEL F8 DO ...
was lurking in the dBASE/DOS program I've been trying to replicate in VFP. Thanks........ posting the problem solved it again!