alec

alec

  • NA
  • 86
  • 57.5k

combobox keypress reject all keys

Mar 23 2012 7:26 AM
I have a combobox and I want to use the keypress event (or keydown if I'm doing it wrong) and I'm using this code:

private void CbQuantitySoldSD_KeyPress(object sender, KeyPressEventArgs e)
 {
            e.Handled = false;
 }

to make it so that when you try and type nothing happens, but when I type into the combobox it still appears in the box. Any ideas?

Answers (3)