1:Add two file "MutexEx.cs" and "NativeMethod.cs" from OpenNETCF  into your solution.
 
2:Code here
static void Main()
  {
   OpenNETCF.Threading.MutexEx mutex = new OpenNETCF.Threading.MutexEx(true,"hahahaha");
   bool running = !mutex.WaitOne(0,false);
   if(!running)
    Application.Run(new Form1());
   else
    MessageBox.Show("Already running.");
  }

相关文章:

  • 2022-01-11
  • 2022-02-12
  • 2022-12-23
  • 2022-03-09
  • 2021-07-06
  • 2021-07-06
  • 2022-01-16
  • 2022-12-23
猜你喜欢
  • 2021-10-30
  • 2021-07-10
  • 2022-12-23
  • 2021-09-19
  • 2021-08-27
  • 2021-11-12
相关资源
相似解决方案