public void add1()
{
SendKeys.Send("1");
Thread.Sleep(1000);
Application.DoEvents();
}
public void add2()
{
SendKeys.Send("3");
Thread.Sleep(1000);
Application.DoEvents();
}
public void add3()
{
SendKeys.Send("2");
Thread.Sleep(1000);
Application.DoEvents();
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
kh.UnHook();
}
private void Form1_Load(object sender, EventArgs e)
{
kh = new KeyboardHook();
kh.SetHook();
kh.OnKeyDownEvent += kh_OnKeyDownEvent;
}
private void kh_OnKeyDownEvent(object sender, KeyEventArgs e)
{
if (e.KeyData == (Keys.F1))
{
add2();
add1();
add3();
Application.DoEvents();
}
}
按键123 每次执行这个语句都是 卡死三秒123同时出来我想的是 1 等一秒 2 等一秒 3 这个出来 怎么实现呢!!!
复制的我还需要问吗