简体   繁体   中英

Banishing the Command Prompt Window (WinForms)

I have a problem over here. You see, I wanted to create my own sample application in C# but without Visual Studio creating the files automatically for me. So I figured that I'd simply select "Empty Project" and then create the Program.cs file myself, and then manually add a Windows Form from the Project menu. That went good.

But then when I clicked the Debug button, to my surprise; The console Window sits behind my Applications Window. And if I try to close the console window, it closes my program's window, too. (This is NOT a Console-based application.)

Can somebody please help me get rid of this console window?

I've looked all over the place but have found nothing regarding this matter.

Go into the properties of your project and change your application Output Type from Console Aplication to Windows Application .

This will fix your issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM