title: How to update toolstrip progress bar in MDI form from child?
body: <p>I am using MDI and child forms. In MDI form, I placed the tool strip progress bar control to show the progress of some action in child forms. I am using the below code to run the progress bar. But it is not working. Please help me.</p>
  
  <p>In MDI Form,</p>
  
  <pre><code>public void UpdateProgessBar(int currentCount, int targetCount, Color progressBarColor)
  {
    toolStripProgressBar.ForeColor = progressBarColor;
    if (targetCount &gt; 0 &amp;&amp; currentCount &gt; 0)
    {
      double progressBarValue = ((double)currentCount / targetCount) * 100;
      if (progressBarValue &gt;= 0)
      {
        Invoke((MethodInvoker)delegate ()
        {
          toolStripProgressBar.Value = Convert.ToInt32(progressBarValue);
        });
    }
  }
  else
  {
    Invoke((MethodInvoker)delegate ()
    {
      toolStripProgressBar.Value = 0;
    });
  }
  </code></pre>
  
  <p>}</p>
  
  <p>In Child Form,</p>
  
  <pre><code>MDIParent mdiParent = new MDIParent();
  mdiParent.UpdateProgessBar(1, 1, Color.LimeGreen);
  </code></pre>
  
  <p>I am getting the error as </p>
  
  <blockquote>
    <p>"System.InvalidOperationException: 'Invoke or BeginInvoke cannot be called on a control until the window handle has been created.'" <br></p>
  </blockquote>
  
  <p>Please help me to resolve this.</p>