Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trapping for F8 in a textbox
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Trapping for F8 in a textbox
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00980789
Message ID:
00980789
Views:
79
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   && for debug only
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!
Randy Bosma
VFP - Because life is too short to code in something else...
Next
Reply
Map
View

Click here to load this message in the networking platform