View Single Post
  #12 (permalink)  
Old 03-12-2008, 06:26 PM
specci48's Avatar
specci48 specci48 is offline
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 605
Default

Hello Kavka,

try this:
Code:
Sub Globals
End Sub

Sub App_Start
    fgTextBox.New1("TextBox1",0)	
    fgTextBox.MaxLength = 2
    TextBox1.Focus
    Form1.Show
End Sub

Sub TextBox1_KeyPress (key)
    ' backspace pressed ?
    If Asc(key) = 8 Then
	Return
    End If
    If StrLength(TextBox1.Text & key) = 2 Then
	TextBox2.Focus
    End If
End Sub

specci48
Reply With Quote