title: C# / Filter input of a textbox and display notification balloon
body: <p>I'm wondering how to filter the input of a .NET textbox.</p>
  
  <p>I already know that I could listen for the KeyDown event and intercept the key, but that won't filter pasted strings by a right-click menu or a CTRL+V.</p>
  
  <p>I also don't wan't to completely disable the possibility of pasting of characters in the textbox. The paste action should be cancelled whenever it contains one or more invalid characters.</p>
  
  <p>Finally, I'd like to display a notification balloon whenever invalid characters are either entered or pasted.</p>
  
  <p>μTorrent already has this exact behavior:</p>
  
  <p><img src="https://i.stack.imgur.com/gFhyZ.png" alt="enter image description here"></p>
  
  <p>How can I achieve this functionality in C# ?</p>