Exemplo n.º 1
0
        private void KeyMouseController_Load(object sender, System.EventArgs e)
        {
            // 작업표시줄 상에서 프로그램이 표시되지 않도록 설정
            this.ShowInTaskbar = false;

            TopMost = true;

            childProcessQuitThread = new Thread(ChildProcessQuit);
            childProcessQuitThread.Start(this.parentQuitMsg);

            hooker.SetHook();
            ctrlAltDeleteScreenMgr.StartListeningForDesktopSwitch(hooker);
        }
Exemplo n.º 2
0
 public static void EventCallback(IntPtr hWinEventHook, uint eventType,
        IntPtr hwnd, int idObject, int idChild, uint dwEventThread, uint dwmsEventTime)
 {
     desktopSwitchCnt++;
     
     if(desktopSwitchCnt == 2)
     {
         Thread.Sleep(1000);
         hookerDelegater.UnHook();
         
         SendKeys.Send("{ESC}");
         
         hookerDelegater.SetHook();
         desktopSwitchCnt = 0;
     }
 }