I had been developing a console application, until our project needed a fancy UI to go with it, so we decided to change the project type to windows form application. We tried putting the code below in our entry point:
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new UI());
It kind of works, but the original console window is still there.
I’ve googled out some useful infos like this one, but what all they do is essentially killing the window after it has been created, not tackling the root of the problem. So is there any more elegant way to do this?
Right click your project in the solution explorer and select properties.
Then, under the “Application” tab change the “Output type” of your project from “Console Application” to “Windows Application.”