I have this code that tries to kill the wampmanager process when the user press on a button. But how can I achieve the same thing if the user clicks on the close button. Is it possible to execute a small line of code just when the user clicks on the close button? If you know any alternatives in achieving this, please do tell. thanks
Dim pProcess() As Process = System.Diagnostics.Process.GetProcessesByName("wampmanager")
For Each p As Process In pProcess
p.Kill()
Next