Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Substituting characters while typing in Edit box
Message
From
27/02/1998 16:19:30
 
 
To
06/02/1998 10:27:15
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00076872
Message ID:
00081776
Views:
28
>Trapped key is with the keycode 61 ? I'm asking this because I've something different from "[" for it, 91 for "[". If it's the case and you just want to absorb it add a nodefault in the keypress.
>
>IF nKeyCode = 61 .AND. nShiftAltCtrl = 0
>   nodefault
>   THIS.Value = THIS.Value + CHR(42)
>ENDIF
>
>So you wouldn't need the interactivechange also.
>Cetin

Thanks for your suggestion, which worked.

To answer your questions, the character you get for a given CHR() value can depend on the font. In my case I was using Courier New.

I have a small program which displays the characters and their ASCII codes one at a time on the main screen for any font, which you may find useful:
cTest_font= GETFONT()
MODI WINDOW SCREEN NOCLOSE FONT LEFT(cTest_font,AT(",",cTest_font)-1)
CLEAR
FOR nCycle = 0 TO 255
    cResult = CHR(nCycle)
    ? STR(nCycle,3) + " " + cResult
    IF MOD(nCycle,20) = 0
        WAIT WINDOW
    ENDIF
ENDFOR
RETURN
Werner
Previous
Reply
Map
View

Click here to load this message in the networking platform