C#确定何时外部应用程序运行或退出 [英] C# Determine when an external app is run or exited

查看:109
本文介绍了C#确定何时外部应用程序运行或退出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是最好的方式,从一个长期运行的进程,以检测何时任意应用程序(如MS Word)中的第一个实例启动时,当它的最后一个实例被关闭? (实际进程终止,不只是被隐藏任务栏来等)

What's the best way, from a long-running process, to detect when the first instance of an arbitrary application (e.g. MS Word) is launched, and when the last instance of it is closed? (Actual process terminated, not just being hidden to taskbar etc)

推荐答案

您可以使用的工艺

下面是一个很好的解决方案: C#控制台应用程序监控过程,它的CPU

Here is a good solution: C# console app to monitor a process and its CPU

这篇关于C#确定何时外部应用程序运行或退出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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