将输出从控制台窗口导入Winform应用程序 [英] Getting the ouput from Console window into Winform application

查看:248
本文介绍了将输出从控制台窗口导入Winform应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个控制台应用程序,它执行一组操作,并在完成每个操作后发出消息。当我运行控制台应用程序时,控制台窗口中的消息可能看起来像这样:

I have a console application which does a set of operations and gives out messages after completion of each operation. When I run my console app, the messages in my console window may look like this:

Checking prerequisites...
Completing prerequisites..
Performing installation...
Completing installation...
Done..!

现在我正在使用Process.StartInfo从我的一个C#Windows应用程序中执行此控制台应用程序( )。
我需要让控制台应用程序抛出的所有消息都以应用程序的Windows形式显示。

Now I'm executing this console application from one of my C# windows applications by using Process.StartInfo(). I need to get all the messages thrown by my console application to be displayed in the windows form of my application.

这可以做到吗?

谢谢。

推荐答案

查看此处捕获来自.NET应用程序(C#)的控制台输出

这篇关于将输出从控制台窗口导入Winform应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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