I have a User Control containing a text box, and I'd like to capture a Ctrl-X key press on that text box. However, whatever I try with regards to capturing the keys doesn't seem to work.
My code currently looks like this:
private void textBox1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
if ((e.KeyData == Keys.X) && (e.Modifiers == Keys.Control))
I know the event is being fired correctly, but it's not successfully matching both the X key and the Ctrl key when pressed together.
I've tried other combinations but nothing seems to work - can anyone help please