Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wpf Net通过Process.Startinfo启动多个命令行_Wpf_Vb.net_Multithreading - Fatal编程技术网

Wpf Net通过Process.Startinfo启动多个命令行

Wpf Net通过Process.Startinfo启动多个命令行,wpf,vb.net,multithreading,Wpf,Vb.net,Multithreading,我正在使用VB.Net通过Process.StartInfo启动多个命令行窗口(相同的exe文件)。我希望这些窗口在后台运行,而不挂起启动它们的主UI线程,同时能够获得这些外部窗口的输出,以在进度条上显示进度 这里是我试图实现的目标的总结,但需要进一步建议哪种方法是可行的 - launch multiple exe command through Process.StartInfo - don't want the external exe to hang my main UI thread -

我正在使用VB.Net通过Process.StartInfo启动多个命令行窗口(相同的exe文件)。我希望这些窗口在后台运行,而不挂起启动它们的主UI线程,同时能够获得这些外部窗口的输出,以在进度条上显示进度

这里是我试图实现的目标的总结,但需要进一步建议哪种方法是可行的

- launch multiple exe command through Process.StartInfo
- don't want the external exe to hang my main UI thread
- need to get feedback from external exe to update progress bar which is placed at main UI thread

如果我需要提供更多信息,请告诉我。非常感谢

您必须使用线程来实现这一点,在单独的后台线程中创建每个新进程

  • 使用Process.Start()启动每个进程
  • 不要调用
    WaitForExit()
  • 为退出的事件添加事件处理程序,以便报告反馈