Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Keyboard specific key
Message
 
To
18/03/2010 07:51:11
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01455293
Message ID:
01455442
Views:
84
This message has been marked as the solution to the initial question of the thread.
>Hello I net the do "." as I am input ip addresses as part of their inventory
>Thanks a lot


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!!!!
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform