创建钥匙钩以便按下组合键后,应用程序将再次打开。 我特地到这样做的各种方式,但我不知道该输入组合将完全不同于这个例子是什么:C#钥匙扣关键事件
if (e.KeyCode == Keys.C && e.Modifiers == Keys.Control && e.Modifiers == Keys.Shift)
{
//Do work
}
else if (e.KeyCode == Keys.V && e.Modifiers == Keys.Control)
{
//Paste
}
我们的输入组合是从用户,他们选择他们想要输入哪个组合从一个组合框。
public void KeyboardHooks_OnKeyPress(object sender, KeyPressArgs e)
{
//The first input
if (LastKey != Keys.None)
{
Keys combinationOne = (Keys)cmbCombinationOne.SelectedValue;
Keys combinationTwo = (Keys)cmbCombinationTwo.SelectedValue;
}
LastKey = e.Key;
MessageBox.Show("KeyPressed");
}
如何去了解我们的值作为组合框的
这些代码段不会出现有任何与所需的功能,无论“再次打开”和“挂机键”可能意味着。你需要更好地解释你想要完成的事情。 – 2013-04-26 14:06:53