从运行Windows窗体控制台应用程序 [英] Run a console application from a windows Form

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

问题描述

我有一个Windows控制台应用程序(即接受参数)和运行的进程。 我想知道是否有任何方式从一个窗口形式的按钮单击事件中运行这个程序。我想一个参数传递给它。

I have a windows console app (that accepts parameters) and runs a process. I was wondering if there was any way to run this app from within a windows form button click event. I would like to pass an argument to it as well.

感谢

推荐答案

只需使用 System.Diagnostics.Process.Start 的与路径控制台应用程序,而这些参数作为第二个参数。

Just use System.Diagnostics.Process.Start with the path to the console application, and the parameters as the second argument.

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

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