View Single Post
 
Old 04-11-2014, 05:51 AM
JustinCase2 JustinCase2 is offline
Junior Contributor
 
Join Date: Apr 2006
Posts: 324
Default Something like this?

Code:
Private Sub mnuSearchClick_Click(sender As System.Object, e As System.EventArgs) Handles mnuSearchClick.Click
        dim searchString as string = InputBox("Enter video name:", "Search")
        Dim searchFile As New StreamReader(strFILENAME)
        Dim s As String
        Dim li As New List(Of String)
        While searchFile.EndOfStream = False
            s = searchFile.ReadLine
            If s.Contains(searchString) Then
                li.Add(s)
            End If
        End While
        Select Case li.Count
            Case 0
                ' No hits
            Case 1
                ' single hit
            Case Else
                ' Multiple hits, display choice to user
        End Select
end sub
Reply With Quote