In vb.net I have used process.start to open a .exe file and then have a threading.thread.sleep after it for an amount of time. Then I want it to close the .exe file but it won't let me use process.kill/close.
code:
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Process.Start("notepad.exe")
Threading.Thread.Sleep(2000)
Process.Kill()