I'm trying to kill a process that I've started in the program start-up (so its only running while my application is running), however when I try and terminate the process is still running.
Ive tried closing 3 different ways:-
However the process is still running after I close the application.
What Ive got soo far is:-
Dim phpProcess As Process
Dim startInfo As New ProcessStartInfo
Private Sub Form1_Leave(sender As Object, e As EventArgs) Handles Me.Leave
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
NotifyIcon1.Visible = True
NotifyIcon1.BalloonTipText = "Hi from right system tray"
startInfo.FileName = "c:\xampp\php\php.exe"
startInfo.WorkingDirectory = "u:\Documents\Webapp1"
startInfo.Arguments = "-S localhost:85"
startInfo.WindowStyle = ProcessWindowStyle.Hidden
phpProcess = Process.Start(startInfo)
Does anyone have any pointers?