/// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            //获取欲启动进程名
            string strProcessName = System.Diagnostics.Process.GetCurrentProcess().ProcessName;
            ////获取版本号
            //CommonData.VersionNumber = Application.ProductVersion;
            //检查进程是否已经启动,已经启动则显示报错信息退出程序。
            if (System.Diagnostics.Process.GetProcessesByName(strProcessName).Length > 1)
            {

                MessageBox.Show("CtiAgentClient呼叫中心客户端已经运行!", "消息", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                Application.Exit();
                return;
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new frmMain());
        }

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-01
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
  • 2022-02-02
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-01
  • 2021-11-28
相关资源
相似解决方案