private static bool IsAlreadyRunning() { //Find name of current process string currentProcessName = Process.GetCurrentProcess().ProcessName; //Find the name of all processes having current process name Process[] processesNamesCollection = Process.GetProcessesByName(currentProcessName); //Check whether more than one process is running if (processesNamesCollection.Length > 1) return true; else return false; }
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)
General News Suggestion Question Bug Answer Joke Praise Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.