C# – Create separate window from Console Application

cconsole-applicationmulti-windowmultithreading

I'm having a bit of a trouble trying to create a multi window'ed console application. Currently, my application's main console window is used to collect user input and display output.

Much of this output comes from a separate thread, as live data comes in. I was wondering if there is a way for me to separate my application into two windows, where the second window was either a console window or even any other kind of window that could display the text of the incoming strings… In particular, the main console window would be where the user input commands etc, and the second window displayed what the system was currently working on. This second window could be entirely readonly.

Any suggestions would be greatly appreciated! I would post code, but I don't really have anything relevant (that I can think of) to post….

Best Answer

This will be hard to do.

Here is answer for similar question: Can you have multiple .net Consoles (as in Console.Writeline)

If you really want to do it, you can find logic here: http://www.codeproject.com/KB/cpp/MultipleConsoles.aspx

Maby better approach will be to start another process (console app) and communicate between them thru IPC ( Interprocess communication ) - like named pipes .

More about IPC you can find: http://www.infoq.com/news/2008/01/wcf-comm-options