You could try something like
Private Sub txtUser_KeyPress(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtUser.KeyPress
Dim KeyAscii As Integer = Asc(e.KeyChar)
If KeyAscii = 46 Then ' The period
KeyAscii = 0 'place whatever ascii value you want
End If
If KeyAscii = 92 Then ' The backslash.
KeyAscii = 0 'place whatever ascii value you want
End If
If KeyAscii = 0 Then
e.Handled = True
End If
End Sub
maxhodges wrote:
I need to access some unicode characters from the keyboard for single
textbox on a form I've built. I've done this before using the code
below, but now I need to substitute the forward slash and period
character ("/", ".") but I can't find the named constant for these
characters in the KEYS data type. Anyone know that their name is? Or a
good workaround?
Thanks,
maxhodges