title: Trouble with Control.Invoke using VB.NET and CF3.5
body: <p>THis is my first time using threading for an application. I'm working with VB.NET, VS2008, and CF3.5</p>
  
  <p>I made a small test project to try to understand how Threading works, especially when trying to access UI Controls in another thread. My Form is just a single button that says "Start" and should toggle back and forth with "Stop" when pressed. </p>
  
  <p>Here's the code for my test project that I've put together looking at several examples I've found online.</p>
  
  <pre><code>Public Class Form1
  
  Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click
      Dim myThread As New System.Threading.Thread(AddressOf ChangeText)
      myThread.Start()
  End Sub
  
  Private Sub ChangeText() 
      If button1.InvokeRequired Then
          Me.Invoke(New Threading.WaitCallback(AddressOf ChangeText))
      Else
          If button1.Text = "Start" Then button1.Text = "Stop"
          If button1.Text = "Stop" Then button1.Text = "Start"
      End If
  End Sub
  </code></pre>
  
  <p>It builds and deploys just fine but as soon as I click the Button I get an "ArgumentException is unhandled" on the Invoke.</p>
  
  <p>What am I doing wrong?</p>