Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 5th, 2007, 02:01 PM
Authorized User
 
Join Date: Dec 2007
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default How many Instances are running

Hi !

I want to determine how many instances of an application is running while launching the application. Can you plz give me some tips on this ?

Thanks in advance.

dev(1);
__________________
dev(1);
 
Old December 5th, 2007, 02:14 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Depends. Are you trying to determine if an instance of a program you are starting is already running or are you trying to write a program that will determine how many instances of x program are running?

Also, you have been posting here very frequently which is great, but try and do some research on your queries before you come and post here. You have been pretty good with posting relevant code and telling us what you have and have not done to correct your problem, but in the case of the question you posed above, you could have easily gone to google to look up information about this type of thing.

hth

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor :.
Wrox Books 24 x 7
================================================== =========
 
Old December 5th, 2007, 02:45 PM
Authorized User
 
Join Date: Dec 2007
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi!!

I greatly honour & appreciate your efforts towards solving problems posted by me & others like me. However it seems like i have disapointed you. You people have been so nice to me answering all of my posts and that is the reason why i come back to here whenever i get a problem. Google is great but you get a lot of garbage with it unless you r lucky.

Anyway I will keep your suggestion in my mind.

Thank you very much.




Quote:
quote:Originally posted by dparsons
 Depends. Are you trying to determine if an instance of a program you are starting is already running or are you trying to write a program that will determine how many instances of x program are running?

Also, you have been posting here very frequently which is great, but try and do some research on your queries before you come and post here. You have been pretty good with posting relevant code and telling us what you have and have not done to correct your problem, but in the case of the question you posed above, you could have easily gone to google to look up information about this type of thing.

hth

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor :.
Wrox Books 24 x 7
================================================== =========
dev(1);
 
Old December 5th, 2007, 02:49 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

You didn't answer my question about exactly what you are trying to do...

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor :.
Wrox Books 24 x 7
================================================== =========
 
Old December 5th, 2007, 03:38 PM
Authorized User
 
Join Date: Dec 2007
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I need to find out how many instances of the same application are already running.



Quote:
quote:Originally posted by dparsons
 You didn't answer my question about exactly what you are trying to do...

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor :.
Wrox Books 24 x 7
================================================== =========
dev(1);
 
Old December 5th, 2007, 03:51 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I think what Doug was asking can be inferred from your original post:

You have application X. When application X launches, you want to see if, and how many, additional instances of application X are already running.

The alternative is: From application X, I want to see how many instance of application Y are running.

You are asking for the first one correct?

-Peter
 
Old December 5th, 2007, 03:57 PM
Authorized User
 
Join Date: Dec 2007
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yes that right. I want to know how many instances of app x are running from app x.


Quote:
quote:Originally posted by planoie
 I think what Doug was asking can be inferred from your original post:

You have application X. When application X launches, you want to see if, and how many, additional instances of application X are already running.

The alternative is: From application X, I want to see how many instance of application Y are running.

You are asking for the first one correct?

-Peter
dev(1);
 
Old December 5th, 2007, 04:05 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Ok. Read up on the Process class, it should provide you with the information you need =]

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor :.
Wrox Books 24 x 7
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find a node which is between two instances rajatake XSLT 3 December 22nd, 2006 07:31 AM
InStr() repeat instances spinout Classic ASP Components 7 November 23rd, 2006 11:55 AM
Running 2 instances of tomcat steevo590 Apache Tomcat 0 April 5th, 2006 12:53 PM
Named Instances and Performance Hal Levy SQL Server 2000 0 May 23rd, 2005 12:50 PM
Preventing new instances of the same application aehb C# 3 May 18th, 2005 01:14 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.