Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing KeyPress value
Message
De
22/08/1997 11:37:59
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00046080
Message ID:
00046403
Vues:
29
>>what I usually do is >>DO CASE >> CASE nKeyCode= >> nNewkeyCode=new_value >> Textbox::KeyPress(nNewKeyCode,nShiftAltCtrl) && or any other >>control >> NODEFAULT >>. >>. >>ENDCASE > >Nice peice of code, but my only complaint is that when you get into this >type of object oriented answers you need about 4 lines of code explaining >to novices (like myself) what exactly happened. Sometimes visual may be >object oriented, but it is not easy to follow. Bret, what this litte piece of code does is traps a certain nKeyCode (ASCII value of the character typed) and changes it to anther, ths is done by calling the base KeyPress event with the new keycode and preventing the current keypress event from processing the unwanted keystroke (that's what the NODEFAULT is for) Arnon
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform