Is application running?

  • Thread starter Thread starter TClancey
  • Start date Start date
T

TClancey

Hi again, hopefully the last question for the damned application!

I have one application that needs to load another, this may happen everytime
the first app is started, or it may happen randomly.

If the second app is not open my first app needs to open it. If the second
app is running I can simply leave things alone.

I can find loads of examples for 'PrevInstance' but I can't find anything
for checking the Task Manager list to see if the second app is already
there.

Any deas?

Cheers,
Tull.
 
To give the same example...this will search to see if notepad is running and
kill it.
But instead of the kill you can do ur code,

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