Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Keyboard specific key
Message
 
 
À
18/03/2010 12:16:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01455293
Message ID:
01455451
Vues:
48
How dare you to post not fully tested code! People should be able to use it right away not waste there time on adapting and testing it.

>
>
>Put this in KeyPress Event of the TextBox:
>
>
>LPARAMETERS nKeyCode, nShiftAltCtrl
>
>IF nKeyCode == 46 && [.]
>   LOCAL nStart
>   nStart = this.SelStart 
>   NODEFAULT 
>   DO CASE
>      CASE nStart < 5    
>           this.Value     = PADL(ALLTRIM(LEFT(this.Value,3)),3)+SUBSTR(this.Value,4)
>           this.SelStart  = 4
>           this.SelLength = 3
>
>      CASE nStart < 9    
>           this.Value     = LEFT(this.Value,4)+PADL(ALLTRIM(SUBSTR(this.Value,5,3)),3)+SUBSTR(this.Value,8)
>           this.SelStart  = 8
>           this.SelLength = 3
>
>      CASE nStart < 13    
>           this.Value     = LEFT(this.Value,8)+PADL(ALLTRIM(SUBSTR(this.Value,9,3)),3)+SUBSTR(this.Value,12)
>           this.SelStart  = 12
>           this.SelLength = 3
>   ENDCASE
>ENDIF
>
>
>NOT WELL TESTED!!!!
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform