Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing KeyPress value
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00046080
Message ID:
00046184
Vues:
22
>>In a text object's KeyPress event, how do I change the value of the keycode before it gets placed in the objects value?
>>
>>Thanks in advance,
>>Mike
>
>
>We also used the following in the keypress event for upper and lower transition:
>
>
>DO CASE
>CASE nShiftAltCtrl = 0 ;
>and nKeyCode > 64 ;
>and nKeyCode < 91
>* Allow upper case letters
>CASE nShiftAltCtrl = 0 ;
>and nKeyCode > 96 ;
>and nKeyCode < 128
>* Force letters to uppercase
>* and pipe them back to the
>* above case
>NODEFAULT
>KEYBOARD upper(chr(lastkey()))
>ENDCASE

Nodefault and stuffing the keyboard buffer works fine. Strange way to "eat my sandwich" but it does the job. Looks like MS would have provided a way to pass a different value back to the object directly from within the keypress event. Many thanks for the help.

Regards,
Mike
Michael McLain
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform