Killing a process

  • Thread starter Thread starter jerith.alphonse
  • Start date Start date
J

jerith.alphonse

Hi.

I want to write a application in vb.

it should kill an application which is running already.

Note:- I don want to use this find window funda. ie by catching the
window title and terminating

can any one help me?
 
it should kill an application which is running already.

Note:- I don want to use this find window funda. ie by catching the
window title and terminating

Check out 'System.Diagnostics.Process'.
 
This should get you started.

'Where textbox1.text = "NOTEPAD" not NOTEPAD.EXE
Dim myProcesses() As Process
Dim myProcess As Process

myProcesses = Process.GetProcessesByName(Trim(TextBox1.Text))
For Each myProcess In myProcesses
myProcess.Kill()
Next


Miro
 
Back
Top