Ok here's the situation. Want to control if certain websites are accessed. I can put in a name such as "yahoo" or "vbcity" or whatever in the code and it works. But I want to be able to add name to the list without rewriting the program everytime I want to add a site. Is this possible with a simple text file?
The code below seems to retrieve the info that I need, but it puts 2 little squares between each name in the text file, I think then it looks for the site name with those 2 little suares added. If I just type one name in the text file it works, but when I type more than one, it doesn't. Thanks in advance.

VB Code:
  1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  2.         For Each proc As Process In Process.GetProcessesByName("iexplore") 'calls internet explorer process
  3.  
  4.             Dim intex As String = proc.MainWindowTitle.ToLower 'changes MainWindowTitle text to lower case
  5.            
  6.             Dim fileContents As String
  7.  
  8.             fileContents = My.Computer.FileSystem.ReadAllText("C:\Visual Studio 2005\Projects\WindowsApplication1\WindowsApplication1\textfile1.txt") 'reads text file
  9.  
  10.             If intex.Contains(fileContents) Then
  11.                 MsgBox("Found Window!")
  12.  
  13.             Else : MsgBox("Could not find window")
  14.             End If
  15.              
  16.         Next
  17.  
  18.     End Sub

Thank You,
Michael Ifland
Visual Basic.NET 2005