v6j04-05.frm
来自「简单的VB课程教学课件适合刚刚接触VB学习的学生学习,绝对是这门课程的精化」· FRM 代码 · 共 63 行
FRM
63 行
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "Case"
Height = 495
Left = 2910
TabIndex = 2
Top = 2640
Width = 1455
End
Begin VB.TextBox Text1
Height = 555
Left = 2910
TabIndex = 1
Text = "Text1"
Top = 1260
Width = 1245
End
Begin VB.CommandButton Command1
Caption = "If Then"
Height = 495
Left = 1110
TabIndex = 0
Top = 2640
Width = 1455
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()
strC = Text1
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
Private Sub Command2_Click()
strC = Text1
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 + =
减小字号Ctrl + -
显示快捷键?