Programming for Everybody: Allowing characters and comma in text box VB.net

Allowing characters and comma in text box VB.net

Private Sub pay1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles pay1.KeyPress
        e.Handled = Not (Char.IsDigit(e.KeyChar) Or e.KeyChar = ".")
    End Sub

No comments:

Post a Comment