Click here to Skip to main content
12,511,494 members (55,609 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

8K views
2 bookmarked
Posted

Attaching a Console to a WinForms application

, 18 Jan 2012 CPOL
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...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

25 Jan 2012
fastal
VB version:Friend Declare Function AllocConsole Lib "kernel32.dll" () As BooleanFriend Declare Function FreeConsole Lib "kernel32.dll" () As BooleanSub main() Dim MainForm As New frmMain If Command = "" Then MsgBox1 = AddressOf MyMsgBox1 ' messagebox delegate sub call...
7 Feb 2012
DaveyM69
3 alternatives  
How to have a real console window as well as your forms
25 Feb 2012
Andreas Gieriet
To not having spoiled the client code with #if DEBUG, you might use the following:[STAThread]static void Main(){ Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); try { Debugging.DebugSetupConsole(); ...

License

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

Share

About the Author

johannesnestler
Austria Austria
No Biography provided

Pro
Pro
| | Privacy | Terms of Use | Mobile
Web01 | 2.8.160929.1 | Last Updated 18 Jan 2012
Article Copyright 2012 by johannesnestler
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid