How do I capture the enter key in a windows forms combo box when the combobox is active?
I\'ve tried to listen to KeyDown and KeyPress and I\'ve created a subclass a
Try this:
protected override bool ProcessCmdKey(ref Message msg, Keys k) { if (k == Keys.Enter || k == Keys.Return) { this.Text = null; return true; } return base.ProcessCmdKey(ref msg, k); }