title: How to only allow digits and dots in a textbox?
body: <p>I'm wondering how I can get my textbox to only accept digits and dots, like:</p>
  <p>123.45
  or 115
  or 218.16978</p>
  <p>etc.</p>
  <p>I already have the following code:</p>
  <pre><code>Private Sub TxtHStof_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TxtHStof.KeyPress
      e.Handled = Not Char.IsDigit(e.KeyChar)
      
  End Sub
  </code></pre>
  <p>But that only allows digits without the dots.</p>
  <p>How can I change the code so it does allows the dots as well, but nothing else?</p>