View Single Post
  #3 (permalink)  
Old June 8th, 2006, 04:00 AM
Shyam Bharath Shyam Bharath is offline
Authorized User
 
Join Date: Jun 2006
Location: Hyderabad, AP, India.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

VB.NET

Private Sub TextBox1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress

        If e.KeyChar >= Chr(48) And e.KeyChar <= Chr(57) Then
            MsgBox(e.KeyChar.ToString)
        End If

End Sub
Reply With Quote