Killing a process

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?
 
H

Herfried K. Wagner [MVP]

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'.
 
M

Miro

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top