Example #1
0
 public static IntPtr hookProc(int code, IntPtr wParam, IntPtr lParam)
 {
     if (code >= 0 && wParam == (IntPtr)WM_KEYDOWN)
     {
         int vkCode = Marshal.ReadInt32(lParam);
         if (vkCode.ToString() == Configuration.TeclaRemo)
         {
             Operations.AutoRemo();
         }
         if (vkCode.ToString() == Configuration.TeclaInvi)
         {
             Operations.AutoInvi();
         }
         if ((Keys)vkCode == Keys.F5)
         {
             Win32Libraries.UnHook();
             Application.Exit();
         }
         return((IntPtr)1);
     }
     else
     {
         return(CallNextHookEx(hhook, code, (int)wParam, lParam));
     }
 }
Example #2
0
 private void timer3_Tick(object sender, EventArgs e)
 {
     if (Win32Libraries.GetAsyncKeyState(Configuration.remo) == -32767)
     {
         Operations.AutoRemo();
     }
     if (Win32Libraries.GetAsyncKeyState(Configuration.invi) == -32767)
     {
         Operations.AutoInvi();
     }
     Thread.Sleep(100);
 }    // TIMER AUTOREMO/INVI
Example #3
0
 private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     Win32Libraries.UnHook();
 }