Yet another way to this is as follows:
static class Program
static void Main()
Mutex mutex = new Mutex(true, "UniqueID", out instantiated);
Take a look there
] to read the complete article.
To download the sample code, you can go here
After downloading, go to bin
directory and then debug OnlyOneInstance.exe
, you will see a message box which states Program Already Running.