Support Forums

Full Version: Simple process kill
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello guys,

With this code you can simply kill a process:
Quote:For Each p As Process In System.Diagnostics.Process.GetProcessesByName("notepad")
Try
p.Kill()
p.WaitForExit()
Catch winException As System.ComponentModel.Win32Exception
Catch invalidException As InvalidOperationException
End Try
Next

If the code you see "notepad"edit this part with the process name of your program.

Best regards,
Strafeness