VB.Net检查进程是否存在及关闭进程

前端之家收集整理的这篇文章主要介绍了VB.Net检查进程是否存在及关闭进程前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
Dim i As Integer Dim proc As Process() '判断excel进程是否存在 If System.Diagnostics.Process.GetProcessesByName("excel").Length > 0 Then proc = Process.GetProcessesByName("excel") '得到名为excel进程个数,全部关闭 For i=0 to proc.Length -1 proc(i).Kill() Next End If proc = Nothing 原文链接:https://www.f2er.com/vb/258269.html

猜你在找的VB相关文章