티스토리 툴바

Mr. WiseBell

Program.cs에 다음과 같이 코드 추가

using System.Threading;

        static void Main()
        {            bool createdNew;
            Mutex dup = new Mutex(true,"Mu", out createdNew);             

            if (createdNew)
            {
                Application.Run(new From());
                dup.ReleaseMutex();
            }
            else
            {
                MessageBox.Show("이미 프로그램이 실행중입니다.");
            }           
        }

Creative Commons License

'Study > Programming' 카테고리의 다른 글

이상형을 찾아서~  (4) 2009/12/16
NUnit  (0) 2009/09/09
Call Level Interface (CLI)  (2) 2009/04/15
Visual C# .NET 에서 Word 문서 생성  (0) 2008/07/25
스트링객체 성능 올리는법  (0) 2008/05/14
C#에서 동일한 프로그램에 중복 실행을 방지하는 방법  (0) 2008/01/31
Posted by WiseBell Trackback 0 Comment 0