系统诊断过程开始查询 [英] System Diagnostics Process Start Query
本文介绍了系统诊断过程开始查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的应用程序已经在后台编写定时的Excel工作表.我现在已经导出了Excel工作表,并希望从我的应用程序中将其打开.
因此使用了process.start
System.Diagnostics.Process.Start(FilePath);
问题是在打开文件后,控件没有返回到代码,并且我的打开文件对话框挂起.
因此,我必须关闭该应用程序并重新启动它.
请提出一个解决方案.
My application is already writing a timed excel sheet in the background. I have now exported and excel sheet and want to open it from my application.
so for it is used process.start
System.Diagnostics.Process.Start(FilePath);
Problem is after the file is being opened, control does not return to the code and my open file dialog box hangs.
Thus i have to close the application and restart it.
Please Suggest a solution.
推荐答案
谁在开发这种没有线程的东西?您应该从UI线程执行任何阻止调用,甚至不要执行任何耗时的操作.不幸的是,您没有与我们分享您使用哪种类型的应用程序或UI库,但是想法非常相似.
请从这里开始:
http://msdn.microsoft.com/en-us/library/ff647051.aspx [ ^ ],
http://msdn.microsoft.com/en-us/magazine/cc163328.aspx [ ^ ].
另请参阅我过去对相关问题的回答:
Control.Invoke()与Control.BeginInvoke() [ ^ ],
Treeview Scanner和MD5问题 [如何获取keydown事件在vb.net中的不同线程上操作 [启用禁用+多线程后控件事件不会触发 [ ^ ].
—SA
Who is developing such things without threading? You should do any blocking call from the UI thread, not even any time-consuming operations. Unfortunately, you did not share with us what type of application or UI library do you use, but the ideas are very similar.
Please start here:
http://msdn.microsoft.com/en-us/library/ff647051.aspx[^],
http://msdn.microsoft.com/en-us/magazine/cc163328.aspx[^].
See also my past answer to related questions:
Control.Invoke() vs. Control.BeginInvoke()[^],
Problem with Treeview Scanner And MD5[^];
How to get a keydown event to operate on a different thread in vb.net[^],
Control events not firing after enable disable + multithreading[^].
—SA
这篇关于系统诊断过程开始查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文