C# output on both form textbox and console application using RedirectStandardOutput and Error streams

风流意气都作罢 提交于 2020-01-05 15:04:09

问题


The question here is if anyone has an idea how to both get StandardOutput data to print in Windows form application and keep the output in the console itself. The WinForms part I have completed already, it works great with process events and invoking form elements. At this point I am pretty sure that after re-directing output, Console.Writeline() doesn't print anything on the console window anymore. Any ideas besides running another dummy process that simply displays anything whats on InputStream?

Also

While I'm at this. Is there any way to access process that is on another thread? Since whenever I try to access it it shows that its out of scope.

来源:https://stackoverflow.com/questions/8787123/c-sharp-output-on-both-form-textbox-and-console-application-using-redirectstanda

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!