static void Main()
        
{
            
bool newMutexCreated = true;
            
using (new Mutex(true, Assembly.GetExecutingAssembly().FullName, out newMutexCreated)){
                
if (!newMutexCreated) //exist
                    return;
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(
false);
                Application.Run(
new ServiceForm());
            }

        }

posted on 2006-04-11 11:19  steeven  阅读(2369)  评论(6编辑  收藏  举报