吃惊
This commit is contained in:
parent
0aef357ab2
commit
2fbacdf140
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user