Click here to Skip to main content
Click here to Skip to main content
Alternative Tip

Attaching a Console to a WinForms application

, 18 Jan 2012
Rate this:
Please Sign up or sign in to vote.
Very good tip. I just want to mention an alternative - you can just change your project output type to a console application. (You can undo it later if only needed for debugging). So if you started with a Windows Forms project in Visual Studio: Go to project properties/application/ and in the...

Very good tip. I just want to mention an alternative - you can just change your project output type to a console application. (You can undo it later if only needed for debugging). So if you started with a Windows Forms project in Visual Studio: Go to project properties/application/ and in the "output type" combobox, select Console app. Run your app and you will see all Console.WriteLine calls (...). Change back to a Windows Forms project, console is gone (no code changes needed).

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

johannesnestler

Austria Austria
No Biography provided

Comments and Discussions

 
Generalthanks, I have used that when I needed to mix. However this ... Pinmemberfastal25-Jan-12 5:47 
thanks, I have used that when I needed to mix. However this came in very handy when I wanted to have an app which was usually interactive, but, I wanted to access the console when run from a batch mode and not be interactive. This meant that I didn't want it to start a console in the background most of the time, only when there was a command line. Whereas a console app always displays one by default (not what I wanted) and you'd have to quick hide it. thanks.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.140721.1 | Last Updated 18 Jan 2012
Article Copyright 2012 by johannesnestler
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid