Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
How can i make user writes only character in a textbox
boujarmoune ismail
Jul 12 2012 2:56 AM
1.1k
Reply
i try this but it dosen't work
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
Dim x As String = Nothing
If TextBox1.TextLength > 0 Then
For j As Integer = 0 To TextBox1.Text.Count - 1
If Char.IsNumber(TextBox1.Text(j)) Or Char.IsSymbol(TextBox1.Text(j)) Then
t = j
Dim s As String() = Split(TextBox1.Text, TextBox1.Text(j))
For i As Integer = 0 To s.Count - 1
x = x & s(i)
Next
TextBox1.Text = x
Exit Sub
End If
Next
End If
End Sub
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
CREATION LIST OF DATES
fixed and dynamic data structures