指定のプロセス名をすべて終了させてみます。
' 対象プロセス名は"Main"
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim p As New System.Diagnostics.Process
Dim inst As Process
Dim myProcess() As Process
myProcess = System.Diagnostics.Process.GetProcessesByName("Main")
For Each inst In myProcess
p = System.Diagnostics.Process.GetProcessById(inst.Id)
p.Kill()
Next
End Sub
0 件のコメント:
コメントを投稿