JawwadLone
Programmer
How can we check the ascii code of the key press in vb.net. I have tried this code
Private Sub txtRNo_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtRNo.KeyPress
If e.KeyChar = "A" Then
MsgBox("A is pressed")
End If
End Sub
But I do not know how can i check the range of values in keypress or keydown event. Like we can do in vb 6.0
If keyascii>=65 and keyascii<=90 then
Msgbox("Value between A to Z")
End If
Kindly provide me any help if possible. I shall be very thankfull to you.
Regards,
Jawwad Rashid Lone.
Private Sub txtRNo_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtRNo.KeyPress
If e.KeyChar = "A" Then
MsgBox("A is pressed")
End If
End Sub
But I do not know how can i check the range of values in keypress or keydown event. Like we can do in vb 6.0
If keyascii>=65 and keyascii<=90 then
Msgbox("Value between A to Z")
End If
Kindly provide me any help if possible. I shall be very thankfull to you.
Regards,
Jawwad Rashid Lone.