且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

是否可以从c Sharp应用程序动态创建新进程?

更新时间:2023-10-15 23:03:10

您是否正在寻找 ^ ]?
[edit]
在这种情况下,如何创建2个线程.一种作为生产者,可以从Web上获取数据并将其放入某些数据存储中.第二个(您的主UI)从该数据存储中获取数据.
Are you looking for Thread[^]?
[edit]
In that case, how about you create 2 Threads. One as producer which fetch data from web and place it into some data storage. And the second one (your main UI) grab the data from that data storage.


System.Diagnostics.Process.Start(name of the process/file);



如果您的UI因持续更新而挂起,请在获取值之前和之后使用Application.DoEvents();.它将刷新所有线程,并且您的UI不会挂起.



if your UI is hanged due to continuous updation use Application.DoEvents(); before and after fetching values. it will refresh all threads and your UI will not hanged.