在文本框Text1中输入一个字符
代码如下:(PS:注意将Form1的AutoRedraw属性置为true)
Private Sub Command1_Click()
Dim letter(1 To 26) As Integer
Dim str As String
Dim size As Integer
Dim thechar As String
Dim i As Integer
str = StrConv(Text1。 Text, vbLowerCase)
size = Len(str)
For i = 1 To size
thechar = Mid(str, i, 1)
If Asc(thechar) 96 The...全部
代码如下:(PS:注意将Form1的AutoRedraw属性置为true)
Private Sub Command1_Click()
Dim letter(1 To 26) As Integer
Dim str As String
Dim size As Integer
Dim thechar As String
Dim i As Integer
str = StrConv(Text1。
Text, vbLowerCase)
size = Len(str)
For i = 1 To size
thechar = Mid(str, i, 1)
If Asc(thechar) 96 Then
letter(Asc(thechar) - 96) = letter(Asc(thechar) - 96) + 1
End If
Next
For i = 1 To 26
Print Chr(i + 96); vbTab; letter(i)
Next
End Sub
。
收起