I'm trying to create a program, where a user can use the textbox to search for information, and as soon the user begins to type, any matching results will show autofill. I was able to do that, but I also want to make partial word match: words are found that only match partially (Example search: "apple" also finds "pineapple"). Could some one help me in achieveing this?
This is what I have so far:
Public Class Form1
'Declaration
Public Property AutoCompleteMode As AutoCompleteMode
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Create the list to use as the custom source.
Dim MySource As New AutoCompleteStringCollection()
MySource.AddRange(New String() _
{ _
"January", "Joke", "James", "Joy", _
"February", _
"March", _
"April", _
"May", _
"June", _
"July", _
"August", _
"September", _
"October", _
"November", _
"December" _
})
' Initialize the text box.
TextBox1.AutoCompleteCustomSource = MySource
TextBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend
TextBox1.AutoCompleteSource = AutoCompleteSource.CustomSource
End Sub
End Class