流程结束 [英] process closing

查看:131
本文介绍了流程结束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我想检测进程何时关闭并取消该事件.诸如FormClosing事件和FormClosingEventArgs.Cancel之类的东西,但用于其他应用程序.这件事可能吗?

Hello, I want to detect when a process is closing and cancel the event. Something like FormClosing event and FormClosingEventArgs.Cancel but for other application. Is this thing possible? If it is how?

推荐答案

您有两种方法通知进程已退出:Process.Exited事件或Process .WaitForExit方法.不幸的是,这些过程是在流程退出后发生的.实际上,您无法通过事件重新启动相同的过程.有关更多信息,请参见此链接: http://msdn.microsoft.com/zh-CN -us/library/system.diagnostics.process.exited.aspx [ ^ ]
You have two ways to be notified that a process has exited: The Process.Exited Event or the Process.WaitForExit Method. Unfortunately, these happen after the process has exited. In fact you can''t event restart the same process. See this link for more information: http://msdn.microsoft.com/en-us/library/system.diagnostics.process.exited.aspx[^]


这篇关于流程结束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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