title: Raising an event on a new thread in VB.NET
body: <p><strong>I need to raise an event from a form on a new thread.</strong></p>
  
  <p><em>(I don't believe the reason for this is relevant, but just in case:  I'll be raising events from code within a form's WndProc sub.  If the code handling the event blocks with something on a form [such as a msgbox], then all sorts of trouble occurs with disconnected contexts and what not.  I've confirmed that raising events on new threads fixing the problem.)</em></p>
  
  <p><strong>This is what I am currently doing:</strong></p>
  
  <pre><code>Public Event MyEvent()
  
  Public Sub RaiseMyEvent()
      RaiseEvent MyEvent
  End Sub
  
  Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
      Dim t As New Threading.Thread(AddressOf RaiseMyEvent)
      t.Start()
  End Sub
  </code></pre>
  
  <p><strong>Is there a better way?</strong></p>
  
  <p>It is my understanding that events in VB are actually made up of delegates in the background.  Is there any way to raise events in new threads without creating subs for each?  Or, is there a more appropriate method I should be using?</p>