Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tricky textbox scenario
Message
De
01/03/2007 18:47:28
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01199526
Message ID:
01200154
Vues:
17
>I have a textbox on a small form which users can enter job numbers from 1 to 9999. However, if they enter a zero, I want the form to release,(bringing them back to a previous form). I have tinkered with the keypress event but if a user enters 650, the '0' would trigger the keypress event and release the form. But I need to compare the whole textbox.value to what the last key typed was and it seems the keypress event is not where to do this. Any ideas?

I know I'm late, but

Place in the keypresse event this.
dodefault()  && force the character into the field first.
if len(alltrim(this.Value))==1 and alltrim(this.Value)=='0'
    thisform.release()
endif 
Greg Reichert
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform