does anyone knows how to input letters and disable inputting an integer or number?... plsss help...tnx
lerkei 0 Light Poster
Recommended Answers
Jump to Postu just to handle keychar.
try this following code :Private Sub text1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles text1.KeyPress If (Microsoft.VisualBasic.Asc(e.KeyChar) < 65) _ Or (Microsoft.VisualBasic.Asc(e.KeyChar) > 90) _ And (Microsoft.VisualBasic.Asc(e.KeyChar) < 97) _ Or (Microsoft.VisualBasic.Asc(e.KeyChar) > 122) Then 'space allowed If (Microsoft.VisualBasic.Asc(e.KeyChar) <> …
Jump to Postups... i was mistake here. there are code for vb.net.. :P.
this is code for vb 6, the logic is still same :Private Sub Text1_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 48 To 57, 8, 32 'Let these key codes pass through Case 97 To 122, …
All 5 Replies
bushman_222 0 Junior Poster in Training
Jx_Man 987 Nearly a Senior Poster Featured Poster
Jx_Man 987 Nearly a Senior Poster Featured Poster
lerkei 0 Light Poster
akgs 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.