📄 例题5.1 判断字符为字母或数字.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "例题5.1 判断字符为字母或数字"
ClientHeight = 2550
ClientLeft = 60
ClientTop = 345
ClientWidth = 3705
LinkTopic = "Form1"
ScaleHeight = 2550
ScaleWidth = 3705
StartUpPosition = 3 'Windows Default
Begin VB.TextBox Text1
Height = 495
Left = 1215
TabIndex = 1
Top = 533
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "判断"
Height = 495
Left = 1275
TabIndex = 0
Top = 1523
Width = 1215
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim strc As String
strc = Text1.Text
If UCase(strc) >= "A" And UCase(strc) <= "Z" Then
Print strc + "是字母字符"
ElseIf strc >= "0" And strc <= "9" Then
Print strc + "是数字字符"
Else
Print strc + "是其它字符"
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -