📄 统计字符数.frm
字号:
VERSION 5.00
Begin VB.Form Frmcharacter
Caption = "统计字符个数"
ClientHeight = 3120
ClientLeft = 60
ClientTop = 345
ClientWidth = 3375
LinkTopic = "Form1"
ScaleHeight = 3120
ScaleWidth = 3375
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command3
Caption = "退出"
BeginProperty Font
Name = "黑体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1680
TabIndex = 7
Top = 2280
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "统计"
BeginProperty Font
Name = "黑体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 240
TabIndex = 6
Top = 2280
Width = 1215
End
Begin VB.TextBox Text4
Appearance = 0 'Flat
Height = 375
Left = 1440
TabIndex = 2
Top = 1320
Width = 1455
End
Begin VB.TextBox Text3
Appearance = 0 'Flat
Height = 375
Left = 1440
TabIndex = 1
Top = 840
Width = 1455
End
Begin VB.TextBox Text2
Appearance = 0 'Flat
Height = 375
Left = 1440
TabIndex = 0
Top = 360
Width = 1455
End
Begin VB.Label Label3
Caption = "其他字符:"
Height = 255
Left = 480
TabIndex = 5
Top = 1440
Width = 1095
End
Begin VB.Label Label2
Caption = "数字符号:"
Height = 255
Left = 480
TabIndex = 4
Top = 960
Width = 1095
End
Begin VB.Label Label1
Caption = "字母符号:"
Height = 255
Left = 480
TabIndex = 3
Top = 480
Width = 975
End
End
Attribute VB_Name = "Frmcharacter"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command2_Click()
Text2 = ""
Text3 = ""
Text4 = ""
Dim str As String
str = frmmain.Rtext.Text
For i = 1 To Len(str)
Select Case Mid$(str, i, 1)
Case "a" To "z", "A" To "Z'"
s = s + 1
Text2 = s
Case 0 To 9
d = d + 1
Text3 = d
Case Else
q = q + 1
Text4 = q
End Select
Next i
End Sub
Private Sub Command3_Click()
frmmain.Show
Me.Hide
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -