如何嵌入一个WinForms应用程序中的控制台应用程序 [英] How to embed a Console application inside a Winforms application
问题描述
我正在开发,它作为的Minecraft服务器(运行作为控制台的Java应用程序)的GUI的应用程序。
I'm developing an application which acts as a GUI for Minecraft Server (runs as a console Java application).
我已经完成了它,我也想加入的WinForms应用程序中的控制台,因为我想给用户在程序的控制。但是,使用流(Process.StandardOutput)我不能模拟控制台,因为它有时会改变光标位置,清除控制台等等...
I have 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 streams (Process.StandardOutput) I can't simulate a console as it sometimes changes the cursor position, clears the console, etc...
所以,我想嵌入过程进入应用不知。我试着将第一溶液去除边框并据此将其定位到窗体的位置,但不幸的是我不能这样做。
So, I want to embed the process into the application somehow. The first solution I tried was removing the borders and positioning it accordingly to the form's position but unfortunately I couldn't do it.
任何工作代码段将不胜感激!
Any working code snippets would be greatly appreciated!
推荐答案
下面你可以找到一些很好的答案,就如何嵌入一个控制台应用程序,以双赢方式:
Here you can find some good answers, on how to embed a console app to a win form:
这篇关于如何嵌入一个WinForms应用程序中的控制台应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!