using System; using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; namespace ProgramLauncher { internal static class Program { public static string projectName = "StudioInstaller"; static string mutexName = "UVC_"; [STAThread] static void Main() { mutexName = mutexName + projectName; using (var mutex = new Mutex(true, mutexName, out bool isNewInstance)) { if (!isNewInstance) { // 이미 실행 중인 경우 MessageBox.Show("이미 프로그램이 실행 중입니다.", "중복 실행 방지", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); } } } }