title: What has happened to the thread of execution in this VB.net/COM dll?
body: <p>According to the answers to <a href="https://stackoverflow.com/questions/11155628/visual-basic-net-how-to-create-a-thread-to-update-the-ui/11155681">another question</a>, the VB user interface cannot be updated if the thread that created it is busy:  hence why big computational jobs usually have to go in a background task.</p>
  
  <p>Here's what's mystifying then.  I have the following code.  It's called over in-process COM, like this</p>
  
  <ol>
  <li>client calls <code>showform()</code></li>
  <li>client does loads of work, freezing up its own UI in the process</li>
  <li>client finishes work, returns to updating its own UI</li>
  </ol>
  
  <p>At step 2, the VB form is there but frozen - you can't interact with it.  At step 3, the VB form becomes usable.  But why is this?  Surely the thread of execution has returned to the client?  If the client is somehow handling events for the form, by what magic did it know what events to handle and where to send them?</p>
  
  <pre><code>&lt;ComClass(ComClass1.ClassId, ComClass1.InterfaceId, ComClass1.EventsId)&gt; _
  Public Class ComClass1
  
    Public Sub New()
        MyBase.New()
    End Sub
  
    Private f1 As Form1
  
    Public Sub showform()
        f1 = New Form1()
        f1.Show()
    End Sub
  
  End Class
  </code></pre>