Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Text Box
Message
From
05/03/2002 03:30:23
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
05/03/2002 03:15:26
Ashish Patel
Hindustan Petroleum
Mumbai, India
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00628249
Message ID:
00628253
Views:
13
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform