Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking for characters
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00063081
Message ID:
00063138
Vues:
57
>>>>>>The easiest way to get the codes is to stick a WAIT WINDOW STR(nKeyCode) in the KeyPress.
>>>Look in the Online Help under Inkey(). It lists the KeyCodes.
>>
>>Actually, it misses a bunch of them, such as the apostrophe and quotations mark. That's why I recommended trying it to find out....
>
>
>Garrett,
>
>I couldn't find the key codes for (') and ("), so I used the following code in the valid method of the textbox:
>
>Local temptext
>
>temptext = occurs("'",this.value)
>
>if temptext>0
> =messagebox("This field cannot contain the (') character!",16,osys.Appname)
> this.value = ""
> thisform.refresh()
>ENDIF
>
>
>That takes care of the ('), but not the ("). Oh well, I'll stick with this for now unless someone knows where to find these key codes.
>
>AL

Sorry for interrruption,
nKeycode1=asc('"')
nKeycode2=asc("'")
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform