求算法.....题目如下: 输入一个字符,判断起属于大写字母、小写字母、数字、或其他字符。

如题所述

用VB编程:
在下列过程中用Ascii 码识别
Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
If KeyAscii >= 32 Then
If KeyAscii <= vbKey9 And KeyAscii >= vbKey0 Then

Else
KeyAscii = 0

End If
End If
End Sub追问

能不能写成算法,拍照发给我。。谢谢!

追答

Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
If KeyAscii >= 48 And KeyAscii = 65 And KeyAscii = 97 And KeyAscii <= 122 Then Call MsgBox("小写字母!", vbOKOnly + vbInformation, "提示")
End Sub

追问

谢谢!

追答

不客气

温馨提示:答案为网友推荐,仅供参考

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网