Beispiel #1
0
 // Install the hook
 public void Install()
 {
     InternalHook = Win32Api.SetWindowsHookEx(InternalHookType, CallBackFunction, IntPtr.Zero, Win32Api.GetCurrentThreadId());
 }
Beispiel #2
0
        private static bool IsPressed(Keys key)
        {
            const int keyPressed = 0x8000;

            return(Convert.ToBoolean(Win32Api.GetKeyState((int)key) & keyPressed));
        }