2012年9月1日 星期六

消失在記憶中的code

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

沒有留言:

張貼留言