PC Review


Reply
Thread Tools Rate Thread

Check for a previous instance of an app on a network

 
 
ricky
Guest
Posts: n/a
 
      21st Nov 2004
I found the code below on how to check for a previous instance of an
app, but I don't think this will work for a network executeable. So,
how do you check to see if there is multiple instances of an
executeable running on a network?

Public Sub CheckForExistingInstance()
'Get number of processes of you program
If Process.GetProcessesByName _
(Process.GetCurrentProcess.ProcessName).Length > 1 Then

MessageBox.Show _
("Another Instance of this process is already running", _
"Multiple Instances Forbidden", _
MessageBoxButtons.OK, _
MessageBoxIcon.Exclamation)
Application.Exit()
End If
End Sub
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I test for previous instance of the application? Helene Day Microsoft Dot NET 3 4th May 2004 08:45 PM
Detecting a previous instance... agro_r Microsoft Dot NET Framework 2 15th Apr 2004 09:01 AM
Check if previous instance of application exists Hubert Hermanutz Microsoft C# .NET 3 12th Feb 2004 08:29 AM
MDI and sending message to a previous instance Brian Beach Microsoft Dot NET Framework Forms 0 4th Nov 2003 06:19 PM
Bringing back previous instance Franz Microsoft Dot NET Framework 0 11th Aug 2003 07:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:41 AM.