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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check for a previous instance of an app on a network?

Status
Not open for further replies.

rkckjk

IS-IT--Management
Apr 27, 2001
34
US
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
 
What's the problem???

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
Oops, I forgot to mention the problem. Problem below:

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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top