Is there a way to show the console in a Windows application?
I want to do something like this:
static class Program { [STAThread] static void Main(string[] args) { bool consoleMode = Boolean.Parse(args[0]); if (consoleMode) { Console.WriteLine('consolemode started'); // ... } else { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); } } }
What you want to do is not possible in a sane way. There was a similar question so look at the answers.
Then there’s also an insane approach (site down – backup available here.) written by Jeffrey Knight: