diff --git a/HaoYue.BF3ChineseInput/MainWindow.xaml.cs b/HaoYue.BF3ChineseInput/MainWindow.xaml.cs index 9b059ba..1db0764 100644 --- a/HaoYue.BF3ChineseInput/MainWindow.xaml.cs +++ b/HaoYue.BF3ChineseInput/MainWindow.xaml.cs @@ -52,11 +52,12 @@ namespace HaoYue.BF3ChineseInput public static extern IntPtr GetF(); //获得本窗体的句柄 [System.Runtime.InteropServices.DllImport("user32.dll", EntryPoint = "SetForegroundWindow")] public static extern bool SetF(IntPtr hWnd); //设置此窗体为活动窗体 - private void timer1_Tick(object sender, EventArgs e) - { - if (this.Handle != GetF()) //如果本窗口没有获得焦点 - SetF(this.Handle); //设置本窗口获得焦点 - } + + //private void timer1_Tick(object sender, EventArgs e) + //{ + // if (this.Handle != GetF()) //如果本窗口没有获得焦点 + // SetF(this.Handle); //设置本窗口获得焦点 + //} private void hook_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) {