My Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Button1.Enabled = False
Dim Process1 As New Process
Process1.StartInfo.FileName = ("data\test.exe")
Process1.EnableRaisingEvents = True
AddHandler Process1.Exited, AddressOf OnExit
Process1.Start()
End Sub
Sub OnExit(ByVal sender As Object, ByVal e As EventArgs)
Button1.Enabled = True
End Sub
I try..
Sub OnExit(ByVal sender As Object, ByVal e As EventArgs)
Procces1.Close()
Button1.Enabled = True
End Sub
Still Error
Is there any solution?