VB-APP:检查运行进程 [英] VB-APP: Check for running processes

查看:121
本文介绍了VB-APP:检查运行进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我试图让我的程序在有''notepad.exe''等特定进程时立即给出一个MsgBox。我试过以下几行:

Hi,

I''m trying to make my program give a MsgBox as soon as there''s a certain process on such as ''notepad.exe''. I tried something in the lines of:

展开 | 选择 | Wrap | 行号

推荐答案





我正试图让我的程序尽快给出一个MsgBox,例如''notepad.exe ''。我试过以下几行:

Hi,

I''m trying to make my program give a MsgBox as soon as there''s a certain process on such as ''notepad.exe''. I tried something in the lines of:

展开 | 选择 | Wrap | 行号


我认为你的IF语句总是会返回false ,因为过程,将是null(无)或进程对象的实例,而不是布尔值。


而我正在使用它,如果你在VB.NET中而不是VB,你应该使用.NET构造MessageBox.Show()而不是MsgBox
I would think that your IF statement would always return false, since "process" would either be null(nothing) or an instance of the process object, and never a boolean.

And while I''m at it, if you''re in VB.NET and not VB, you should be using the .NET constructs MessageBox.Show() and not MsgBox



而我在它,如果你在VB.NET而不是VB,你应该使用.NET构造MessageBox.Show()而不是MsgBox
And while I''m at it, if you''re in VB.NET and not VB, you should be using the .NET constructs MessageBox.Show() and not MsgBox



我得到了两者程序,VB2005和VB.NET,我经常混淆两个,然后我的代码混淆了。我的意思是VB.NET。


感谢joedeene,我现在设法通过自己和它的工作来进一步工作:)


感谢您的帮助。

I got both programs, VB2005 and VB.NET, I often confuse both and then my code gets mixed up. I meant VB.NET here.

Thanks joedeene, I now managed to work that out a little further by myself and its working :)

Thanks for the help.


这篇关于VB-APP:检查运行进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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