//保证该程序只有一个在运行
            bool createdNew;
            System.Threading.Mutex mutex_Application = new System.Threading.Mutex(true, "Robot", out createdNew);
            if (!createdNew)
            {
                MessageBox.Show("本程序只允许同时运行一个!");
                return;
            }

            Login Lrm = new Login();
            if (DialogResult.OK == Lrm.ShowDialog())
            {
                Mywork MyMainForm = new Mywork();
                Application.Run(MyMainForm);
            }
            else
            {
                Application.Exit();
            }

相关文章:

  • 2022-02-27
  • 2021-06-23
  • 2022-12-23
  • 2021-12-13
  • 2022-03-02
  • 2021-06-23
  • 2022-01-31
  • 2021-06-27
猜你喜欢
  • 2022-12-23
  • 2021-06-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案