G
Guest
Sometimes it is useful to intercept keyboard entry and take some action on
the actual entry to make it more useful, etc. How do I duplicate the
functionality of the following VB6 code to VB.Net 2005 code? (if you enter u
or U in txtAccountNumber, rather than a "u" or "U", a "1" appears.)
Private Sub txtAccountNumber_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 85 'U, change to 1
KeyAscii = 49
Case 117 'u, change to 1
KeyAscii = 49
Case Else
' do nothing, all entry except U or u is OK
End Select
End Sub
Thanks, John Brown
the actual entry to make it more useful, etc. How do I duplicate the
functionality of the following VB6 code to VB.Net 2005 code? (if you enter u
or U in txtAccountNumber, rather than a "u" or "U", a "1" appears.)
Private Sub txtAccountNumber_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 85 'U, change to 1
KeyAscii = 49
Case 117 'u, change to 1
KeyAscii = 49
Case Else
' do nothing, all entry except U or u is OK
End Select
End Sub
Thanks, John Brown