Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ingrid Problem
Message
De
16/07/1998 15:45:18
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
15/07/1998 11:52:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00116648
Message ID:
00118280
Vues:
42
>Hi, Alex
>
>One command in the KeyPress event should be modified as follows to cover the "0" situation:
>
> CASE BETWEEN(m.nKeyCode, 48, 126) OR m.nKeyCode=32 && AlphaNumeric
>
>To increase the key reset time, change the _DBLCLICK setting (The default is 0.5 second)

I'll stop writing this, but I have a feeling everyone's forgotten it: BETWEEN(m.nKeyCode, 48, 126) doesn't cut it. Whoever wrote it first, obviously had a very narrow definition of what is an alphanumeric and what is not. This works in codepage 1252 and only in 1252. Any other codepage uses codes beyond 127 up to 254. The function IsAlpha() reflects this quite OK (i.e. it complies to the codepage defined in config.fpw) thus making your code independent of codepage.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform