在C# - WinForms中,如何在ToolStripTextBox中按下Alt +左键时检测它?
答案 0 :(得分:4)
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) {
if (this.ActiveControl == toolStripTextBox1.Control && keyData == (Keys.Alt | Keys.Left)) {
MessageBox.Show("it's special");
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}