S
starbuck
Hi All
We are converting a VB6 app to VB.NET and have come across a little problem
In VB6 the following code
Private Sub User_txt_KeyPress(KeyAscii As Integer)
KeyAscii = Key_Filter_Alpha(KeyAscii)
End Sub
Calls
Function Key_Filter_Alpha(keyc%) As Integer
Select Case keyc%
Case 32
Case 3 'Ctrl C
Case 24 'Ctrl X
Case 8 'BackSpace
Case 48 To 57 'Number 0-9
Case 65 To 90 'A-Z
Case 97 To 122 'a-z
keyc% = keyc% - 32
Case Else
keyc% = 0
End Select
Key_Filter_Alpha = keyc%
End Function
And only returns upper case letters, nothing else. We can not seem to get
this to work in VB.NET, and ideas, hints etc.
Thanks in advance.
We are converting a VB6 app to VB.NET and have come across a little problem
In VB6 the following code
Private Sub User_txt_KeyPress(KeyAscii As Integer)
KeyAscii = Key_Filter_Alpha(KeyAscii)
End Sub
Calls
Function Key_Filter_Alpha(keyc%) As Integer
Select Case keyc%
Case 32
Case 3 'Ctrl C
Case 24 'Ctrl X
Case 8 'BackSpace
Case 48 To 57 'Number 0-9
Case 65 To 90 'A-Z
Case 97 To 122 'a-z
keyc% = keyc% - 32
Case Else
keyc% = 0
End Select
Key_Filter_Alpha = keyc%
End Function
And only returns upper case letters, nothing else. We can not seem to get
this to work in VB.NET, and ideas, hints etc.
Thanks in advance.