How can I determine if the Backspace has been pressed in the KeyPress event?
问题 This: http://msdn.microsoft.com/en-us/library/system.windows.forms.control.keypress.aspx ...indicates that I should have access to e.KeyCode in the KeyPress event, but I don't seem to. I'm trying to allow only 1,2,3, and backspace: private void textBoxQH1_KeyPress(object sender, KeyPressEventArgs e) { if ((e.KeyChar != '1') && (e.KeyChar != '2') && (e.KeyChar != '3') && (e.KeyChar != (Keys.Back))) { e.Handled = true; } } ...but "e." does not show a "KeyCode" value like the example shows, and