I'm currently programming a logon server for an application, I will need all the objects I made in another server that I made in the same project, but now I want some way to split both applications up in sepertate console screens up, without running 2 serperate c# applications
-
3You might want to give [this](http://msmvps.com/blogs/jon_skeet/archive/2010/08/29/writing-the-perfect-question.aspx) a read, and come back to edit your question. – PiousVenom Jan 14 '13 at 20:54
-
You want two distinct consoles? As in, two distinct command line interfaces? – JerKimball Jan 14 '13 at 20:56
-
3http://stackoverflow.com/questions/8023796/open-a-new-console-with-every-new-thread-in-c – I4V Jan 14 '13 at 20:56
-
i want to have 1 console, with 2 seperate screens to keep track of the messages the server outputs, – Jonathan Jan 14 '13 at 21:18
-
What does it mean `1 console, with 2 seperate screens`? – I4V Jan 14 '13 at 21:25
1 Answers
You'll need to create a form to display your output, as there is a strict limit of one true win32 console per process.
Your comment mentioning "1 console with 2 separate screens" suggests an alternative. The Win32 Console API has rich functionality for placement of text within the console window. You can change color, background color, intensity as well. But for this purpose the most interesting capability is to scroll only part of the console window. I've actually done this before to create two separate output streams in a single console window. Unfortunately, there's no easy way to access this functionality from .NET -- you'd have to use p/invoke extensively (or write your own wrapper using C++ interop). And it doesn't have any concept of focus to allow two independent input streams; it only works for multiple outputs.

- 277,958
- 43
- 419
- 720