Reputation: 9990
In C# - WinForms, how to detect Alt + left key when it is pressed in ToolStripTextBox?
Upvotes: 2
Views: 776
Reputation: 942438
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);
}
Upvotes: 4