Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

App.PrevInstance in C#

Status
Not open for further replies.

BobTheMad

Programmer
Jun 11, 1999
81
US
In VB6 there was this handy little function called 'App.PrevInstance' that would tell you if there was another instance of the current application already running. I cannot find a C# equivalent.

Is there one, or is there a way to spin through the active threads on the PC looking for another instance?

Thank you in advance!

Thought for the day: Beware of Gods who cannot laugh...
 
What most people do is use a named Mutex object. Use the constructor overload that tells you if it was successfully created to find out if another process has already created one with the same name.

Chip H.


____________________________________________________________________
Donate to Katrina relief:
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top