Check if Textfile.txt Contain Certain Strings

2.6k views Asked by At

I am creating a system to validate if a text file contains this serial number, if it contains it opens to Form2.

enter image description here

1

There are 1 answers

0
dovid On BEST ANSWER
Dim content = My.Computer.FileSystem.ReadAllText(filePath)
If content.Contains(stringToSearch) Then
    Dim form As New Form2
    form.Show()
End If