"Rob" <Ro*@discussions.microsoft.comwrote in message
news:B5**********************************@microsof t.com...
What is the C# command/function for checking to see if another instance of
the application is already running?
Use a mutex like this:
...
bool firstInstance;
using (Mutex AppMutex = new Mutex(true, new
Guid("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx").ToString(), out firstInstance))
{
if (firstInstance== true)
{
// run your code from here
}
} // mutex released here.
...
Willy.