/// <summary> /// 注册应用程序的锁定处理 /// </summary> private static void RegisterAppLockProcess() { appTimer.Interval = 1000; //每间隔一秒执行一次检查 appTimer.Tick += new EventHandler(CheckLockState); appTimer.Start(); LockMessager lm = new LockMessager(); Application.AddMessageFilter(lm); }