using System.Threading;
static void Main()
{
Mutex m_Ctmt = new Mutex(true, "MutexInstance");
if (m_Ctmt.WaitOne(0,false))
{
Application.Run(new CtServerAp_Main());
}
else
{
MessageBox.Show("you can't run another");
}
}
两句话防止程序多重启动(.net winform)
浙公网安备 33010602011771号