コード例 #1
0
 private static void OnHotKeyPressed(HotKeyEventArgs e)
 {
     if (SlowHotKeyManager.HotKeyPressed != null)
     {
         SlowHotKeyManager.HotKeyPressed(null, e);
     }
 }
コード例 #2
0
            protected override void WndProc(ref Message m)
            {
                if (m.Msg == WM_HOTKEY)
                {
                    HotKeyEventArgs e = new HotKeyEventArgs(m.LParam);
                    SlowHotKeyManager.OnHotKeyPressed(e);
                }

                base.WndProc(ref m);
            }
コード例 #3
0
ファイル: Program.cs プロジェクト: Spycoclown/FynnMouseMgt
        static void Main(string[] args)
        {
            // Schnell machen:
            HotKeyManager.RegisterHotKey(Keys.A, KeyModifiers.None);
            HotKeyManager.HotKeyPressed += new EventHandler <HotKeyEventArgs>(HotKeyManager_HotKeyPressed);

            // Langsam machen:
            SlowHotKeyManager.RegisterHotKey(Keys.B, KeyModifiers.Alt);
            SlowHotKeyManager.HotKeyPressed += new EventHandler <HotKeyEventArgs>(HotKeyManager_HotKeyPressedSlow);

            Console.ReadLine();
        }