title: ComboBox menu repeat bug after typing in textbox in Winform app
body: <p>I have a primitive app with 2 comboBoxes. They work fine after first starting the app.</p>
  
  <p><a href="https://i.stack.imgur.com/2e4nE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2e4nE.png" alt="Screenshot1"></a></p>
  
  <p>However after typing in text in the search bar and pressing enter, the comboboxes loop their contents.</p>
  
  <p><a href="https://i.stack.imgur.com/jnq71.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jnq71.png" alt="Screenshot2"></a></p>
  
  <p>It happens after I type in the textbox, even if I do not press enter. Every time I press a key another repeat list of options appends to the comboBox.
  How do I prevent this comboBox malfunction?  Here is my code.</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using System.Windows.Forms;
  //Nick Knapp
  //CSCI 363 Fall 2019
  namespace c363_hw3_2
  {
      public partial class Form1 : Form
      {
  
          public Form1()
          {
              InitializeComponent();
  
  
  
          }
  
          private void Form1_Load(object sender, EventArgs e)
          {
  
              this.Text = "Library Literature Search";
              this.BackColor = Color.White;
  
              comboBox2.Items.Add("All");
              comboBox2.Items.Add("Books");
              comboBox2.Items.Add("Papers");
              comboBox2.Items.Add("Films");
              comboBox2.Items.Add("CDs");
              comboBox2.Items.Add("Other");
              comboBox2.SelectedIndex = 0;
  
  
              comboBox1.Items.Add("Title");
              comboBox1.Items.Add("Author");
              comboBox1.Items.Add("Publisher");
              comboBox1.Items.Add("ISBN");
              comboBox1.SelectedIndex = 0;
  
              // this.textBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(CheckEnter);
              //this.Controls.Add(textBox1);
              this.ActiveControl = textBox1;
              textBox1.KeyPress += new KeyPressEventHandler(keypressed);
  
          }
          private void keypressed(Object o, KeyPressEventArgs e)
          {
              if (e.KeyChar == (char)Keys.Return)
              {
                  textBox1.Text = "";
                  e.Handled = true;
              }
          }
  
  
          private void tableLayoutPanel1_Paint(object sender, PaintEventArgs e)
          {
  
          }
  
          private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
          {
  
          }
      }
  }
  </code></pre>