claudebl
claudebl

Reputation: 75

Bytes position of a FindInFiles search in vb.Net

I am unable to set the position in bytes using FindInFiles search. Wouldn't it be conceivable to think that one could access the search position when the searched word is found?

Below is my search code through all the files in a directory in my application.

If Not String.IsNullOrWhiteSpace(Trim(TextBox1.Text)) Then
                Dim matches As String = Trim(TextBox1.Text).ToLower
                Dim list As System.Collections.ObjectModel.
      ReadOnlyCollection(Of String)

                list = My.Computer.FileSystem.FindInFiles(My.Application.Info.DirectoryPath & "\Librairies\",
     matches, True, FileIO.SearchOption.SearchTopLevelOnly)
                If list.Count > 0 Then
                    For Each filename In list
                        ListView1.Items.Add(System.IO.Path.GetFileName(filename))
                        'ListView1.Items(0).SubItems.Add(FirstCharacter)
                    Next
                Else
                    MessageBox.Show("Aucun résultat.")
                End If
            End If

Upvotes: 0

Views: 79

Answers (0)

Related Questions