title: stopping the keydown event in C#
body: <p>How can i stop keydown event in my current situation?</p>
  
  <pre><code>private void button1_Click(object sender, EventArgs e)
  {
      textBox1.Focus();
      textBox1.KeyDown += new KeyEventHandler(MyKeyPress);
  }
  
  public void MyKeyPress(object sender, KeyEventArgs e)
  {
      e.SuppressKeyPress = true;
      string first = e.Modifiers.ToString();
  
      if (first != "None")
      {
          if ((e.KeyCode != Keys.ShiftKey) &amp;&amp; (e.KeyCode != Keys.Alt) &amp;&amp; (e.KeyCode != Keys.ControlKey))
          {
              textBox1.Text = e.Modifiers.ToString() + " &amp; " + e.KeyCode.ToString();
          }
      }
      else
      {
          textBox1.Text = e.KeyCode.ToString();
      }
      e.Handled = true;
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/pmbXX.png" alt="enter image description here"></p>
  
  <p>As you can see - the event is triggered when user clicks on a button.. but how can I stop the it after the first output?</p>
  
  <pre><code>e.Handled = true;
  </code></pre>
  
  <p>does not help at all</p>