title: Hide console when opening WinForm
body: <p><a href="https://i.stack.imgur.com/66Z0f.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/66Z0f.png" alt="enter image description here"></a>I am trying to write a WinForm directly from Notepad++</p>
  
  <p>But when I run the .exe file it opens a console with no text and also the WinForm
  If I close it the WinForm closes</p>
  
  <p>How can I hide the console so only the WinForm opens
  My base code is:</p>
  
  <pre><code>using System;
  using System.ComponentModel;
  using System.Drawing;
  using System.Windows.Forms;
  
  namespace CodeTry
  {
      public class Form1336 : Form
      {
          [STAThread]
          static void Main()
          {
              Application.EnableVisualStyles();
              Application.Run(new Form1336());        
          }
  
          public Form1336()
          {
              this.Size = new Size(500, 300);
              this.Location = new Point(30, 30);
          }               
      }
  </code></pre>
  
  <p>Thanks in Advance</p>
  
  <p>Note: When I double-click on try.exe, the console Window opens (the one in black) and also de WinForm. If I close the console the WinForm closes</p>