VB Code:
'/// assuming you have a Combobox called " ComboBox1 " on your Form...
Private searcher As String = String.Empty
Private Sub ComboBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles ComboBox1.KeyPress
If Not e.KeyChar = Convert.ToChar(Keys.Back) Then
searcher += e.KeyChar.ToString
If Not ComboBox1.FindString(searcher) = -1 Then
With ComboBox1
.SelectedIndex = .FindString(searcher)
.SelectionStart = searcher.Length
.SelectionLength = .Text.Length - searcher.Length
End With
End If
Else
ComboBox1.Text = ""
searcher = ""
End If
End Sub
Private Sub ComboBox1_Validated(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.Validated
searcher = ""
End Sub