title: Prevent combobox from changing the selected option when user types. C#
body: <p>I have a combobox which has focus, if the user types a character, how do I prevent the combobox to change the selected index. </p>
  
  <p>Say I have a combobox with options "A" and "B", "A" is selected and the combobox has focus, if the user presses "B", the combobox changes to the "B" option, how do I prevent this from happening?</p>
  
  <p>The reason I want to do this is because I'm using a barcode scanner and the dropdown contains a list of printers, the selected printer prints something related to what the barcode scanner scans. So If I the combobox/dropdown has focus and the barcode scanner sends input, it changes the selected printer.</p>
  
  <p>This is the first solution I used: I used the keypress event on the combobox and set the handled flag to true</p>
  
  <pre><code>    private void comboBox_KeyPress(object sender, KeyPressEventArgs e)
      {
          e.Handled = true;
      }
  </code></pre>
  
  <p>But this solution does not work for Windows 98.</p>