If you’ve written a small console application, say something that doesn’t require a UI e.g. a batch script that you want to make into an exe, you’ve probably noticed that an unnecessary/unwanted command window pops up.
To stop the command window from opening you can simply make a change in the project properties by setting the Application Type from Console Application to Windows Forms Application.
This can be done from within the project, click on Projects at the top of the screen and then click on Properties as show below.
Then change the application type from Console Application to Windows Forms Application as shown below.