title: Show Hide  Form in Application
body: <p>I have problem with show or hide form in Window Form Application.</p>
  
  <p>I start first running loginform at program.cs ( Application.Run(new loginform());), when login success, then show another form ( Main Interface ) and I want to close or hide loginform when second form is shown, but it is not working.</p>
  
  <p>I don know how to do it. Is it a Thread related problem or not?</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Windows.Forms;
  
  namespace Myapp
  {
     static class Program
     {
          /// &lt;summary&gt;
          /// The main entry point for the application.
          /// &lt;/summary&gt;
          [STAThread]
          static void Main()
          {
  
              Application.EnableVisualStyles();
              Application.SetCompatibleTextRenderingDefault(false);
              Application.Run(new Loginfrm());
  
          }
      }
  }
  </code></pre>