title: Invoke failed in a task
body: <p>I have this code :</p>
  
  <pre><code>var task = System.Threading.Tasks.Task.Factory.StartNew(() =&gt;
  {
      // Code...
      Invoke(new Action(() =&gt; progressBar.Increment(1)));
      // Code...
  });
  
  task.Wait();
  </code></pre>
  
  <p>But the Invoke fail, without Exception or any kind of error.
  It seems that the "wait" prevents the refresh of the form, probably because I'm still in the method.</p>
  
  <p>how do I get around this?</p>
  
  <p>Thanks</p>