Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trapping for F8 in a textbox
Message
De
26/01/2005 17:00:33
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Divers
Thread ID:
00980789
Message ID:
00980968
Vues:
46
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   && 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!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform