title: System.invalidOperationException with thread that downloads from FTP
body: <p>I am trying to download a chat.txt file from my ftp server so it updates fast instead of with a timer because the form is lagging with a timer. but now i get the error:</p>
  
  <p>A first chance exception of type 'System.InvalidOperationException' occurred in System.Windows.Forms.dll</p>
  
  <p>and my code is:</p>
  
  <pre><code>Private Sub RefreshChat()
      Dim client As New Net.WebClient
      client.Credentials = New Net.NetworkCredential("username", "pass")
      Do
          Try
              Dim ChatInfo = client.DownloadString("ftp://ftphost/Users/" + Me.Text + "/" + Me.Text + TextBox3.Text + "Chat.txt")
              TextBox1.Text = Decrypt(ChatInfo)
          Catch
  
          End Try
      Loop
  End Sub
  </code></pre>
  
  <p>this is the full error i get:</p>
  
  <p>A first chance exception of type 'System.InvalidOperationException' occurred in System.Windows.Forms.dll</p>