Public sDecimalSeparator As String = System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator
Private Sub TextBox1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles tbQ.KeyPress, tbV.KeyPress
' Zahlen
Dim sChars As String = "0123456789"
' Backspace (Delete)
sChars = sChars & ControlChars.Back
' akt. Dezimalseparator
sChars = sChars & sDecimalSeparator
' Akt. Taste in der sChars-Liste? Wenn ja, Tastendruck verwerfen (als "behandelt" setzen).
e.Handled = (sChars.IndexOf(e.KeyChar) < 0)
End Sub