Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replace the value of lastkey()
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00461606
Message ID:
00461619
Vues:
8
Try adding an INKEY(.01) after you stuff the keyboard buffer. This will let VFP process the new input. Without it, the {HOME} is just queued for later processing.

HTH.

>Hi all
>
>In the Kepress Event of a textbox I trap the DEL key
>and run some code
>How can I change the value of lastkey() after the Code as run
>
>Ex.:
>Do Case
>   Case nKeyCode = 7 && DEL
>	MESSAGEBOX("1-LASTKEY()"+STR(LASTKEY())) && = 7
>        && Display a Messagebox Asking if we delete or not
>
>        If !Thisform.M_Delete("V")
>    	   CLEAR TYPEAHEAD
>	   KEYBOARD'{HOME}'CLEAR
>	   MESSAGEBOX("2-LASTKEY()"+STR(LASTKEY())) && Still 7
>           && The first letter is deleted because lastkey() = 7
>        Endif
>Endcase
>
>Any Tips ?
>thanks
>Ben.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform