By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,234 Members | 1,850 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,234 IT Pros & Developers. It's quick & easy.

Is application running?

P: n/a
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.
Oct 31 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Try the "Process.GetProcesses()" or "Process.GetProcessesByName()" methods.

-----
Tim Patrick
Start-to-Finish Visual Basic 2005
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.

Oct 31 '06 #2

P: n/a
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


"Tim Patrick" <in*****@invalid.com.invalidwrote in message
news:e3*************************@newsgroups.comcas t.net...
Try the "Process.GetProcesses()" or "Process.GetProcessesByName()"
methods.

-----
Tim Patrick
Start-to-Finish Visual Basic 2005
>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.


Oct 31 '06 #3

P: n/a
Thanks to all!

Cheers,
Tull.

"TClancey" <tu**@idcodeware.co.ukwrote in message
news:cO********************@bt.com...
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.

Nov 2 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.