Greetings
i got a listbox and a textbox, i been trying to get this to search for a word and when it finds the word it returns the whole line. For example if iam searching for "dog" it returns all with "dog" its only returning the exact word. it will not return both with upper and lower case. i been useing this code.
it loads a text file in a listbox first
or how to loop thru a checked listview
Thank you
Dem
Code:For i As Integer = 0 To (Me.Special_Search_Histroy_CheckedListview.CheckedItems.Count - 1) Dim path As String = (Me.Special_Search_Histroy_CheckedListview.CheckedItems(i).SubItems(0).Text) Dim strr As String = (Me.Special_Search_TextBox.Text) 'Dim path As String = (Me.load_special_search_listbox.Items.ToString) Dim readText() As String = File.ReadAllLines(path) For Each s As String In readText If s.Contains(strr ) Then MsgBox(s) End If 'End If Next




Reply With Quote