:: Home     :: Add Questions
Register   |   Login
 

Question :: How can I make sure there is only one instance of my application running?

Post Answer

Tags

Answers to ""

 


Imports System.Diagnostics
...
Dim p As Process
For Each p In Process.GetProcesses(System.Environment.MachineName)
If p.MainWindowHandle <> IntPtr.Zero Then
'this is a GUI app
Console.WriteLine(p) ' string s = p.ToString();
End If
Next p

Related Questions

::Top Tags::
 
 
Copyright 2007, Megasolutions Ltd