Hello students i know you need this codes, so i will provide it to you.. here are the some code's in visual basic 2007/2008... just analyze it!! ^_^

Home » Post Item » textbox classification

textbox classification

August 25, 2009

 Public Class txtForm           click here—>>> 

Before using the code u should change the function, simply click this ” step 1 “ in order to done it well..!!!

 The color Blue states that u have change the function from CLICK to KEYPRESS

Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtalpha.KeyPress
        If IsNumeric(e.KeyChar) Then
            e.KeyChar = “”
        End If

    End Sub

    Private Sub txtnumber_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtnumber.KeyPress
        If Asc(e.KeyChar) <= 32 Or _
                  (Asc(e.KeyChar) >= Asc(”0″) And Asc(e.KeyChar) <= Asc(”9″)) Then
        Else
            e.KeyChar = “”
        End If

    End Sub

Posted by visualcode at 5:27 pm | permalink

All comments are moderated. Your comments will not appear here unless approved by the blog owner. Thank you.

Add a comment