System.Diagnostics.Process.Start("This is the process that you are going to start")
Take note that starting and opening a process is just the same.
Now, let's start this Start and Kill Process tutorial!
1. Let's start with creating a Windows Form Application for this tutorial by following the following steps in Microsoft Visual Studio: Go to File, click New Project, and choose Windows Application.
2. Next, add two Buttons named Button1 labeled as "Start Notepad" and Button2 labeled as "Kill Notepad". You must design your layout like this:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click System.Diagnostics.Process.Start("notepad") End Sub
System.Diagnostics.Process.Start("notepad")
- a syntax used to open your notepad. Take note that you can change any process as long as you have that syntax.
GetProcessesByName(String)
syntax here creates an array of new Process components and associates them with all the process resources on the local computer that share the specified process name. So meaning it will kill all the Notepad Process as we have this code
For Each proces As Process In _proceses proces.Kill() Next
Engr. Lyndon R. Bermoy
IT Instructor/System Developer/Android Developer
Mobile: 09079373999
Telephone: 826-9296
E-mail:[email protected]
Visit and like my page on Facebook at: Bermz ISware Solutions
Subscribe at my YouTube Channel at: SerBermz