Beispiel #1
0
 IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handle)
 {
     if (msg == WM_HOTKEY)
     {
         int i = wParam.ToInt32();
         if (i == HOTKEY_ID_A)
         {
             IntPtr hWnd = WindowsAPI.GetForegroundWindow();
             monitorMgr.CenterWindow(hWnd);
         }
         else if (i == HOTKEY_ID_B)
         {
             IntPtr hWnd = WindowsAPI.GetForegroundWindow();
             monitorMgr.FullScreenWindow(hWnd);
         }
         else if (i == HOTKEY_ID_C)
         {
             IntPtr hWnd = WindowsAPI.GetForegroundWindow();
             monitorMgr.FullScreenWindow(hWnd, 1);
         }
     }
     return(IntPtr.Zero);
 }