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(); }
public AltTabHook() { _lowLevelKeyboardHook = new LowLevelKeyboardHook(); _lowLevelKeyboardHook.MessageIntercepted += OnMessageIntercepted; _lowLevelKeyboardHook.StartHook(); }
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(); } }