Information générale
Catégorie:
Codage, syntaxe et commandes
>>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement