如何检查应用程序是否在Visual Basic中运行 [英] How do I check if an application is running in Visual Basic

查看:88
本文介绍了如何检查应用程序是否在Visual Basic中运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人有示例代码可以让我检查Windows应用程序是否正在运行?我正在使用VBA和VB6。任意一个。我似乎找不到任何好的解释。

Does anyone have sample code that will allow me to check if a windows application is running? I am using VBA and or VB6. Either one. I cant seem to find any good explaination.

推荐答案

不确定为什么你在CLR论坛上提问,你的问题与.Net无关。如果您想要示例代码,您也可以访问VB6或VBA论坛。

Not sure why you ask in the CLR forum, your question has nothing to do with .Net. If you want example code you may as well go to a VB6 or VBA forum.

要识别进程Foo是应用程序栏,您必须定义应用程序的特征(例如文件名,窗口)名称,出版商,版本,32位或64位等)所以你可以开始匹配。没有通用的特征,您
可以与任意应用程序匹配。即使您发现某个流程正在运行,当您的检查代码返回时,该流程也可能会消失。

To recognize process Foo is application Bar you have to define what is the application's characteristics (e.g. file name, window name, publisher, version, 32bit or 64bit etc) so you can begin matching. There is no universal characteristics that you can match against arbitrary applications. And even if you found a process is running, by the time your checking code returns the process may be gone.





这篇关于如何检查应用程序是否在Visual Basic中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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