Allow only Numbers & Letter Character in a Textbox VB.Net | Visual Studio Code

1
Allow only Numbers & Letter Character in a Textbox VB.Net

 (For Number only Character )
 
Private Sub TextBox4_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles NumberTextbox.KeyPress
        If Char.IsNumber(e.KeyChar) = False Then
            e.Handled = True
        End If
    End Sub
    
 (For Letter English Character )
 
    Private Sub TextBox5_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles LetterCharacterTextbox.KeyPress
        If Not Char.IsLetter(e.KeyChar) Then
            e.Handled = True
        End If
    End Sub
    
    (For Special Character )
    
    Public Class Form1
    ReadOnly ValidChars As String = _
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012345678a ,"

 Private Sub TextBox4_KeyPress1(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox4.KeyPress
       
        e.Handled = Not (ValidChars.IndexOf(e.KeyChar) > -1 _
                OrElse e.KeyChar = Convert.ToChar(Keys.Back))
    End Sub

Post a Comment

  1. Allow Only Numbers And Letter Character In A Textbox Vb.Net >>>>> Download Now

    >>>>> Download Full

    Allow Only Numbers And Letter Character In A Textbox Vb.Net >>>>> Download LINK

    >>>>> Download Now

    Allow Only Numbers And Letter Character In A Textbox Vb.Net >>>>> Download Full

    >>>>> Download LINK KJ

    ReplyDelete

 
Top