How do you allow only numbers, backspace, and hyphens in a text box in Visual Studio 2010?
<pre><code>If (e.KeyChar &lt; "0" OrElse e.KeyChar &gt; "9") AndAlso e.KeyChar &lt;&gt; ControlChars.Back AndAlso e.Keychar = "-" Then
    e.Handled = True
</code></pre>

<p>I can't seem to get the code working. I am trying to only include the Text Box to enter numbers, backspace, and hyphens working, but hyphens are not working, other work. Help?</p>