private void Form1_Load(object sender, EventArgs e)
        {
            bool requestInitialOwnership = true;

            bool mutexWasCreated;
            System.Threading.Mutex m = new System.Threading.Mutex(requestInitialOwnership, Application.ProductName, out mutexWasCreated);
            if ( !mutexWasCreated)
            {
                Application.Exit();

            }

 

}

相关文章:

  • 2022-02-11
  • 2021-12-27
  • 2022-01-03
  • 2021-11-20
  • 2021-08-28
  • 2022-01-15
  • 2022-12-23
  • 2022-01-28
猜你喜欢
  • 2021-09-26
  • 2022-02-15
  • 2021-05-30
  • 2021-09-29
  • 2021-05-30
  • 2021-09-10
  • 2021-09-09
相关资源
相似解决方案