C#: How to allow only one instance of an application to run.
Description: Add this method in the Program.cs and call this function within the main() function.
Link: http://www.codekeep.net/snippets/1cf891dd-fb96-4efa-9186-9ab8cdfd57e8.aspx
private static void onlyOneAppInstance()
{
Mutex appSingleton = new System.Threading.Mutex(false, "SingleInstanceRegistroActivo");
if(appSingleton.WaitOne(0, false))
Application.Run(new Login());
appSingleton.Close();
}






