Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cancelling string send to keypress method.
Message
 
 
À
29/05/1998 18:20:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00103271
Message ID:
00103283
Vues:
21
Edward,

In the KeyPress method just issue a NODEFAULT for the keys you want to filter out:
TextBox::Keypress( nKeyCode, nShift )
if ( nKeyCode = 65 )
   * filter out 'A'
  nodefault
endif
>I'm trying to cancel a character string produced by a keypress of a programmable keyboard from being sent to a textbox by validating the first character in the string. Thus far the only methods I've achieved are (1) to let the string write to the textbox and then validate the leftmost character and input an empty string or (2) to disable the textbox by validating the first character in the keypress method of the form. The ideal would be to clear the keyboard buffer from the keypress method, but that doesn't seem to work.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform