You can use a Mutex for this.
example:
using System;
using System.Windows.Forms;
using System.Threading;
class WinApp : Form
{
static void Main()
{
bool firstInstance;
Mutex m = new Mutex(true, "unique_name_here", out firstInstance);
if(firstInstance)
{
Application.Run(new WinApp());
}
else
{
MessageBox.Show("already running!");
}
}
}
Regards, Mikael