消失在記憶中的code

  1. 消失在記憶中的code

消失在記憶中的code

原文連結: https://darkblack01.blogspot.com/2012/09/code.html
移植時的最後更新日期: 2015-12-23T14:16:57.614+08:00

KillProcess(“EXCEL”)


Public Sub KillProcess(ByVal Str_ProcessName As String)
Dim myProcesses() As Process = Process.GetProcesses
Dim procName As String = Str_ProcessName
Dim myProcess As Process
For Each myProcess In myProcesses
If (myProcess.ProcessName.ToLower = procName.ToLower) Then
myProcess.Kill()
End If
Next
End Sub