using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Threading;

namespace Walter.K.Wang.Demo
{
    
static class Program
    
{
        
/// <summary>
        
/// 應用程式的主要進入點。
        
/// </summary>

        [STAThread]
        
static void Main()
        
{
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(
false);
            Mutex mutex 
= new Mutex(false"Walter.K.Wang@gmail.com");
            
if (mutex.WaitOne(0false))
            
{
                Application.Run(Form1.GetForm());
            }

            
else
            
{
                MessageBox.Show(
"該程序已經運行""友情提醒", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }

        }

    }

}
 
posted on 2007-09-16 21:58  wkjs  阅读(175)  评论(0编辑  收藏  举报