프로그램 실행 중복방지
-
C# 프로그램 실행 중복방지닷넷/WinForms 2017. 4. 26. 17:24
Program.cs 파일에int thisID = System.Diagnostics.Process.GetCurrentProcess().Id; // 현재 기동한 프로그램 id // 실행 중인 프로세스 중에서 현재 기동한 프로그램과 같은 이름을 가진 프로그램 수집System.Diagnostics.Process[] p = System.Diagnostics.Process.GetProcessesByName("Process Name"); if (p.Length > 1){ for (int i = 0; i