示例#1
0
 private void hookKeys()
 {
     gHook          = new GlobalKeyboardHook();
     gHook.KeyDown += new KeyEventHandler(gHook_KeyDown);
     gHook.HookedKeys.Add(Keys.Escape);
     gHook.HookedKeys.Add(Keys.Enter);
 }
示例#2
0
        public Main()
        {
            _myInstance = this;
            InitializeComponent();
            setIcon();

            gHook          = new GlobalKeyboardHook();
            gHook.KeyDown += new KeyEventHandler(gHook_KeyDown);
            gHook.HookedKeys.Add(gkeyScreen);
            gHook.HookedKeys.Add(gkeyArea);
            gHook.HookedKeys.Add(gkeyFile);
        }