When closing Console Window its close the all application
<p>I'm working with windows form and i have a main <strong>form</strong> and when I click on some button he  open a <strong>console window</strong> that do some work and when its done I want to close the console without closing the all application (main form). I try to close the console with <code>Environment.Exit(1)</code> or the function <code>Destroy()</code> that belongs to the <code>Destroy()</code> and <code>Create()</code> the console window. the <code>Environment.Exit(1)</code> and  <code>Destroy()</code> both close the console but close the form too.
I wonder if there is a way to close only the console without closing the whole application</p>

<p><strong>EDIT</strong></p>

<pre><code>    private void btSync_Click(object sender, EventArgs e)
    {
        Create();
        ServerSync sycs=new ServerSync();
        Thread sync = new Thread(new ThreadStart(sycs.run));
        sync.Start();
    }
</code></pre>

<p>The <code>Create()</code> open a Console window that run a <code>Socket()</code> Thread.</p>

<p><strong>Problem Solved</strong>
When im start the thread i add to the end of code a <code>ThreadName.Abort</code> and outside the thread i check if <code>ThreadName.IsAlived==false</code> and inside the if i <code>Hide()</code> the console and then <code>Destroy()</code> And Its Works!</p>

<p>the <code>Hide()</code> method from <strong><em>AppDeveloper</em></strong> answer.
Thanks for your help!</p>
