是不是弄错了,应该是wxyz转换为abcd吧?
Private Sub Text1_KeyPress(KeyAscii As Integer)
Dim ckey As Integer
If KeyAscii >= Asc("a") And KeyAscii <= Asc("z") Then
ckey = KeyAscii + 4
If ckey > Asc("z") Then ckey = ckey - Asc("z") + Asc("a") - 1
KeyAscii = ckey
End If
If KeyAscii >= Asc("A") And KeyAscii <= Asc("Z") Then
ckey = KeyAscii + 4
If ckey > Asc("Z") Then ckey = ckey - Asc("Z") + Asc("A") - 1
KeyAscii = ckey
End If
End Sub