title: System.Windows.Forms.Application.Run error
body: <p>I have an application running and when I close it, it generates an error.</p>
  
  <p>So the Form application is ran </p>
  
  <pre><code>[STAThread]
  public void Main()
  {       
      System.Windows.Forms.Application.EnableVisualStyles();
      System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false);
      System.Windows.Forms.Application.Run(new Form1());  
  }
  </code></pre>
  
  <p>When I close application Form1, my IDE throws the following error:</p>
  
  <pre><code>SetCompatibleTextRenderingDefault must be called before the first IWin32Window object is created in the application.
  </code></pre>
  
  <p>How do I make the rest of the application run, without generating the SetCompatibleTextRenderingDefault error once I close the form?</p>
  
  <p>Update:
  I'm reading that it could be because the application is still running, (the instance)</p>
  
  <p>is there an equivalent of:</p>
  
  <pre><code>sForm.Close()
  </code></pre>
  
  <p>I should be using?</p>