コード例 #1
0
ファイル: TrayApp.cs プロジェクト: elcado/WinMoreNSnap
        public TrayApp()
        {
            InitializeComponent();

            // Init the options manager w/ default options
            GetOptions();

            // Set up the hooks
            _keyboard = new LowLevelKeyboardHook();
            _keyboard.MessageIntercepted += Hook.KeyboardHook;
            _keyboard.StartHook();

            _mouse = new LowLevelMouseHook();
            _mouse.MessageIntercepted += Hook.MouseHook;
            _mouse.StartHook();
        }
コード例 #2
0
ファイル: AltTabHook.cs プロジェクト: gsbastian/Switcheroo
 public AltTabHook()
 {
     _lowLevelKeyboardHook = new LowLevelKeyboardHook();
     _lowLevelKeyboardHook.MessageIntercepted += OnMessageIntercepted;
     _lowLevelKeyboardHook.StartHook();
 }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: hoangduit/mwinapi
 private void timer1_Tick(object sender, EventArgs e)
 {
     timer1.Enabled = false;
     if (llhook)
     {
         kbd = new LowLevelKeyboardHook();
         mouse = new LowLevelMouseHook();
         kbd.MessageIntercepted += new LowLevelMessageCallback(ll_MessageIntercepted);
         mouse.MessageIntercepted += new LowLevelMessageCallback(ll_MessageIntercepted);
         kbd.StartHook();
         mouse.StartHook();
     }
     else
     {
         rec = new JournalRecordHook();
         rec.RecordEvent += new EventHandler<JournalRecordEventArgs>(rec_RecordEvent);
         rec.StartHook();
     }
 }