I'm pretty new at programming and I have a question for you guys.
I have recently started making C# forms apps without an IDE and when I compile them a console window opens up first, and then launches the program.
The problem is that the console window stays open even after the launch, and if it's closed it closes the forms app.
For example, a simple program made with the following code:
using System;
using System.Windows.Forms;
using System.Drawing;
public class Form1 : Form
{
public static void Main()
{
Application.Run(new Form1());
}
public Form1()
{
Text = "Test form";
}
}
that is compiled by linking the file to a compiler like Visual Studio through the command prompt, makes a console window pop-up in addition to the Forms window when run.
I know I'm a complete newbie, but is there a way to hide the console window without making the program with an IDE?


Sign In
Create Account


Back to top









