/// <summary> /// 构造函数 /// </summary> public easyOpen() { //Control.CheckForIllegalCrossThreadCalls = false; InitializeComponent(); k_hook = new KeyBoardHook(); k_hook.KeyDownEvent += new KeyEventHandler(hook_KeyDown); //钩住键按下 k_hook.Start(); //安装键盘钩子 InitData(); //this.ShowInTaskbar = true; //不显示在系统任务栏 }
//{ // get // { // lock ("aaa") // { // return new WindowInteropHelper(this).Handle; // } // } //} #endregion 成员变量 #region 窗体方法 public MainWindow() { InitializeComponent(); //_searchWindow = new SearchWindow(); _keyHook = new KeyBoardHook(); _keyHook.KeyDownEvent += new Forms.KeyEventHandler(OnHook_KeyDown); //钩住键按下 _keyHook.Start(); //安装键盘钩子 InitData(); InitNotify(); _instance = this; }