Programming/C#
C# 중복실행방지
분노의블로그
2010. 6. 25. 09:41
반응형
프로그램 진입점에 아래와 같은 코드를 삽입한다.
[STAThread]
static void Main()
{
bool createdNew;
Mutex dup = new Mutex(true, "MU", out createdNew);
if (createdNew)
{
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
dup.ReleaseMutex();
}
}
반응형