例5.4 判断字符类型.frm
来自「蒋加伏主编VB程序设计第四版PPT及全部课本源码 北京邮电大学出版社 」· FRM 代码 · 共 54 行
FRM
54 行
VERSION 5.00
Begin VB.Form Form1
Caption = "例5.4 判断字符类型"
ClientHeight = 2550
ClientLeft = 60
ClientTop = 345
ClientWidth = 4185
LinkTopic = "Form1"
ScaleHeight = 2550
ScaleWidth = 4185
StartUpPosition = 3 'Windows Default
Begin VB.TextBox Text1
Height = 495
Left = 1882
TabIndex = 1
Top = 544
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "判断"
Height = 495
Left = 1087
TabIndex = 0
Top = 1512
Width = 2055
End
Begin VB.Label Label1
BorderStyle = 1 'Fixed Single
Caption = "字符:"
Height = 495
Left = 1035
TabIndex = 2
Top = 540
Width = 735
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
Select Case strc
Case "a" To "z", "A" To "Z"
Print strc + "是字母字符"
Case "0" To "9"
Print strc + "是数字字符"
Case Else
Print strc + "是其它字符"
End Select
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?