title: WinForms Tab Control Causing Cross-Thread Operation
body: <p>This is the error I am receiving. I have a button on a winforms control (as depicted below). I have an async void method that is attached to the click event handler (as depicted below)
  <a href="https://i.stack.imgur.com/bSPbg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bSPbg.png" alt="Error" /></a>
  <a href="https://i.stack.imgur.com/6l3na.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6l3na.png" alt="Button on second tab" /></a></p>
  <p>The issue that I am having is that this code runs <strong>perfectly fine</strong> when I first load in this form, I can click the button 1,000+ times and there is no cross threading errors that occur.</p>
  <p>The <strong>ONLY</strong> time that I get this error is when I do the following</p>
  <ol>
  <li>hide the form <code>form.Hide()</code> (with keeping a reference to the form)</li>
  <li>show the form for a second time <code>form.ShowDialog()</code></li>
  <li>click the refresh button</li>
  </ol>
  <p>It seems like <strong>all</strong> of the buttons on the form will then have some sort of cross-threading issue when calling into UI controls from async method calls. It is almost as if hiding and then re-showing the dialog does <em>something</em> to make new controls on a new thread <strong>BUT</strong> it never calls the Initialize method again.</p>
  <p>Does anyone know why I am having an issue?</p>
  <p><strong>EDIT</strong>
  This is also a VSTO excel addin project. The form is getting created by a ribbon button click and I hold on to a reference of the form in the ribbon class to re-show it</p>