Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Text Box
Message
De
05/03/2002 03:30:23
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
05/03/2002 03:15:26
Ashish Patel
Hindustan Petroleum
Mumbai, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00628249
Message ID:
00628253
Vues:
12
>Hi
>
>I want to display someother characters as soon as user keys-in.
>
>E.g. If user keyis in "A" it should give "X".
> For "B" it should display "Z"
>
>This is because I want to create a text box which displays indian font.
>And when user's key's in "A" I will capture "A" and related character will
>be displayed in text box.
>
>In this How I will be able to take care of Backspace ?
>
>I tried kypress Event.
>But it doesn't work properly.
>
>Thanks in Advance.
>
>Ashish
*Keypress
lparameters nKeyCode, nShiftAltCtrl
if chr(nKeyCode)$'AB...'
  nodefault
do case
 case nKeyCode = asc('A')
    keyboard 'X'
*...
endcase
endif
Better you could maintain a string of replacement chars and use substr to get char. ie:

if chr(nKeyCode) $ myReplaceFromStr
nodefault
keyboard chr(asc(substr(myReplaceTo,nKeyCode)))
endif

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform