I want to use the exclusive key to open context menu that are available in most of the new laptops and keyboards. This key is usually available between right ALT and CTRL key.
I am not sure that it is always equivalent to "Shift + F10" ( or is it always equivalent to "Shift+F10" ?).
My programs runs on Windows XP and earlier vers开发者_如何学Goions.
Context menu should appear at mouse cursor position (if it's possible).
It generates the Keys.Apps keystroke. Paste this code into your form:
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) {
if (keyData == Keys.Apps) {
MessageBox.Show("Context menu here please");
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}
精彩评论