using System.Threading;
public class Class1
{
[STAThread]
static void Main()
{
Mutex mutex = new Mutex(false, "MutexName");
if (!mutex.WaitOne(0, false))
{
mutex.Close();
MessageBox.Show("Another instance is aready running!");
return;
}
Application.Run(new Form1());
}
}
public class Class1
{
[STAThread]
static void Main()
{
Mutex mutex = new Mutex(false, "MutexName");
if (!mutex.WaitOne(0, false))
{
mutex.Close();
MessageBox.Show("Another instance is aready running!");
return;
}
Application.Run(new Form1());
}
}