R
Ryan
I have a form with one button. When button is clicked; it launched Notepad.exe.
The moment Notepad.exe is launched; I want to close my form (actually
application).
How do I do it?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim myProcess As System.Diagnostics.Process = New
System.Diagnostics.Process()
myProcess.StartInfo.FileName = "Notepad.exe"
myProcess.StartInfo.WindowStyle =
System.Diagnostics.ProcessWindowStyle.Normal
myProcess.Start()
End Sub
The moment Notepad.exe is launched; I want to close my form (actually
application).
How do I do it?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim myProcess As System.Diagnostics.Process = New
System.Diagnostics.Process()
myProcess.StartInfo.FileName = "Notepad.exe"
myProcess.StartInfo.WindowStyle =
System.Diagnostics.ProcessWindowStyle.Normal
myProcess.Start()
End Sub