title: What is the easiest way to do Cross-Thread Winforms stuff?
body: <p>To able to do proper cross-thread access I'm using a piece of code something like this :</p>
  
  <pre><code>Private Delegate Sub DelSetButton(ByVal button As Button, ByVal label As String, ByVal enabled As Boolean)
  
  Private Sub SetButton(ByVal button As Button, ByVal label As String, ByVal enabled As Boolean)
      If InvokeRequired Then
          Invoke(New DelSetButton(AddressOf SetButton), button, label, enabled)
  
      Else
          button.Enabled = enabled
          button.Text = label
  
      End If
  End Sub
  </code></pre>
  
  <p>Which is not lovely. </p>
  
  <ul>
  <li>I have to create a delegate with the same signature</li>
  <li>I need to write a similar call for each control type or each action I want</li>
  </ul>
  
  <p>I'm using VB.NET 9 / .NET Framework 3.5. </p>
  
  <p>Is there any better way to do it? Or am I stuck with this model?</p>
  
  <p><strong>UPDATE :</strong></p>
  
  <p>After the answers I like this one best : </p>
  
  <pre><code>Private Sub ContSetButton(ByVal button As Button, ByVal label As String, ByVal enabled As Boolean)
      Invoke(New Action(Of Button, String, Boolean)(AddressOf SetButton), button, label, enabled)
  End Sub
  
  Private Sub SetButton(ByVal button As Button, ByVal label As String, ByVal Enabled As Boolean)
      button.Text = label
      button.Enabled = Enabled
  End Sub
  </code></pre>
  
  <p>Still not perfect but better than what I've done originally. </p>
  
  <p>Feel free to answer if you can make it better than this.</p>