Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Substituting characters while typing in Edit box
Message
De
27/02/1998 16:19:30
 
 
À
06/02/1998 10:27:15
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00076872
Message ID:
00081776
Vues:
32
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform