Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trapping for F8 in a textbox
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Trapping for F8 in a textbox
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Divers
Thread ID:
00980789
Message ID:
00980789
Vues:
80
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...
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform