how to handle this exception :Invalidoperation exception
<pre><code>Application.Run(form);
</code></pre>

<p>Actually I tried to call this from my project.  I got this exception.  How to solve it? I have already called another <code>Application.Run(frmBind);</code> in my project.</p>

<blockquote>
  <p>Starting a second message loop on a single thread is not a valid
  operation. Use Form.ShowDialog instead.</p>
</blockquote>

<pre><code> static void Main(string[] args)
 {
    frmBind = new frmMain();

    Application.Run(frmBind);

    //args1 = string.Copy(args);
}
</code></pre>

<p>This is where I call the Application at first</p>

<p>Now again did it here:</p>

<pre><code>try
{
   // Application.Run( form);
   form.ShowDialog();
}
</code></pre>

<p>Here the exception is thrown.</p>
