Sub Globals
'Declare the global variables here.
Dim Backspace
End Sub
Sub App_Start
frm1.Show
lstbox1.Add("and let us start")
lstbox1.Add("first")
lstbox1.Add("firstly")
lstbox1.Add("firstlyfinal")
lstbox1.Add("last")
End Sub
Sub TxtBox1_KeyPress (key)
If key=Chr(8) Then
Backspace=True
Else
Backspace=False
End If
timer1.Enabled=True
End Sub
Sub Timer1_Tick
timer1.Enabled=false
txt=txtbox1.Text
If Backspace AND StrLength(txt)>0 Then
txt=SubString(txt,0,StrLength(txt)-1)
End If
For i=0 To lstbox1.Count-1
If StrIndexOf(lstbox1.Item(i),txt,0)=0 Then
txtbox1.Text=lstbox1.Item(i)
txtbox1.SelectionStart=StrLength(txt)
txtbox1.SelectionLength=StrLength(lstbox1.Item(i))
Exit
End If
Next
End Sub