DiverDan
Contributor
How do you restrict a textbox entry to only decimals and still have the backspace operational? Is there a way to leave the "0." beginning text in the textbox and then restict only number entry?
Thanks
Thanks
Private Sub txtInput_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtInput.KeyPress
If txtInput.Text = "0." Then
If e.KeyChar = Chr(Keys.Back) Then
e.Handled = True
End If
End If
End Sub