How to embed a console application in a Winforms application

I am developing an application that works as a graphical interface for Minecraft Server (works as a Java console application).

I finished it, and I also want to add a console inside the Winforms application, because I want to give users more control over the program. But using threads (Process.StandardOutput), I can not imitate the console, because it sometimes changes the cursor position, clears the console, etc.

So, I want to somehow implement the process into the application. The first solution I tried was to remove the borders and their location according to the position of the form, but, unfortunately, I could not do this.

Any useful code snippets are welcome!

+8
c #
source share
1 answer

You cannot target both gui and console subsystems in the same module ( msdn ).

Instead, you can add a separate console application that uses SOAP to communicate with your application. Check out WCF to achieve this.

0
source share

All Articles