title: How to prevent the enter key from making a new line in a multiple line text box?
body: <p>I want to prevent the Enter key from making a new line inside the multiple line text box using the KeyDown event. Despite clearing the textBox using textBox.Text = "" or textBox.Clear(), it behaves like this: <a href="http://i.imgur.com/3sknAbO.png" rel="nofollow">http://i.imgur.com/3sknAbO.png</a></p>
  
  <pre><code>private void textBox2_KeyDown(object sender, KeyEventArgs e)
  {
      if (e.KeyCode == Keys.Enter)
          {
              listBox1.Items.Add(textBox2.Text);
              textBox2.Text = "";
          }
  }
  </code></pre>