public Form1() { InitializeComponent(); } private const string MutexName = "SINGLE_INSTANCE_APPLICATION"; private bool _firstApplicationInstance; private Mutex _mutexApplication; private bool CheckApplicationFirstInstance() { // Allow for multiple runs but only try and get the mutex once if (_mutexApplication == null) { _mutexApplication = new Mutex(true, MutexName, out _firstApplicationInstance); } return _firstApplicationInstance; } private void Form1_Load(object sender, EventArgs e) { // Check first instance or not if (CheckApplicationFirstInstance()) { // Yes, this is the first instance // Allow this application } else { // Close application Close(); } }