在Windows窗体中运行控制台应用程序 [英] Running a console application in a windows form

查看:602
本文介绍了在Windows窗体中运行控制台应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我正在制作ac#windows表单应用程序(.net 4.0),我希望在我的GUI应用程序中运行一个控制台应用程序。
我希望能够与程序交互(查看输出,必要时提供输入),就像它在命令提示符下运行一样。 




这有可能吗?至少启动隐藏的控制台应用程序,并查看GUI应用程序的输出?


- Mrutyunjaya

解决方案

< blockquote>

使用Process类,挂钩进入
输入

输出
流..


Hello,

I am making a c# windows form application (.net 4.0) and I am looking to run a console application inside my GUI application. I want to be able to interact with the program (view the output, provide input if necessary) as if it was running in the command prompt. 

Is this possible at all? At the least starting the console application hidden, and viewing the output from the GUI application?

-Mrutyunjaya

解决方案

Use the Process class, hook into input and output streams..


这篇关于在Windows窗体中运行控制台应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆