VB监控程序运行
来源:互联网 发布:歼20骗局知乎 编辑:程序博客网 时间:2024/04/28 07:25
Function CheckApplicationIsRun(ByVal szExeFileName As String) As Boolean
On Error GoTo Err
Dim WMI
Dim Obj
Dim Objs
CheckApplicationIsRun = False
Set WMI = GetObject("WinMgmts:")
Set Objs = WMI.InstancesOf("Win32_Process")
For Each Obj In Objs
If InStr(UCase(szExeFileName), UCase(Obj.Description)) <> 0 Then
CheckApplicationIsRun = True
If Not Objs Is Nothing Then Set Objs = Nothing
If Not WMI Is Nothing Then Set WMI = Nothing
Exit Function
End If
Next
If Not Objs Is Nothing Then Set Objs = Nothing
If Not WMI Is Nothing Then Set WMI = Nothing
Exit Function
Err:
If Not Objs Is Nothing Then Set Objs = Nothing
If Not WMI Is Nothing Then Set WMI = Nothing
End Function
Private Sub Timer1_Timer()
If CheckApplicationIsRun("QQ.exe") = True Then
Print "程序已在运行"
Else
Print "程序没有在运行"
End If
End Sub
'监控某一程序
- VB监控程序运行
- VB无所不能之六:对程序运行的监控
- VB无所不能之六:对程序运行的监控
- VB开机运行程序
- vb 运行外部程序
- VB开机运行程序
- vb程序无法运行
- 用VB写监控程序
- bash 监控程序运行
- vb 运行文件和程序
- VB 避免程序二次运行
- VB.Net程序计算程序运行时间
- 进程监控程序的开发(程序运行监控)
- 防止同一个程序多次运行。 [VB.NET]
- [VB] 防止程序运行多个实例
- 防止同一个程序多次运行。 [VB.NET]
- vb只运行一个程序实例
- VB中限制程序运行时间
- ASP.NET中水晶报表的使用-.NET教程,Asp.Net研发
- 求一个整数各个位上的数字之和
- 宽带路由器评测常见六种误区
- 新形势,新思维,新行动---万科集团主要负责人在"松山湖会议"上的讲话
- carewel混凝土密封固化剂
- VB监控程序运行
- 我的技术相关文章
- 小崔终于实话实说了
- 在Struts 2中实现文件上传
- carewel混凝土密封固化光亮剂
- carewel地坪起砂处理剂
- Google 为 IE6 用户提供 Gmail 升级
- MySQL数据类型简介
- .net使用的两个很好的工具