📄 判定成绩函数.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "例[8-3]成绩评定"
ClientHeight = 1545
ClientLeft = 60
ClientTop = 345
ClientWidth = 4020
LinkTopic = "Form1"
ScaleHeight = 1545
ScaleWidth = 4020
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "评定成绩"
Height = 495
Left = 2640
TabIndex = 4
Top = 525
Width = 1215
End
Begin VB.TextBox Text2
Height = 495
Left = 1200
TabIndex = 3
Top = 885
Width = 1215
End
Begin VB.TextBox Text1
Height = 495
Left = 1200
TabIndex = 2
Top = 165
Width = 1215
End
Begin VB.Label Label2
Caption = "成绩判定 :"
Height = 495
Left = 120
TabIndex = 1
Top = 885
Width = 1215
End
Begin VB.Label Label1
Caption = "请输入成绩:"
Height = 495
Left = 120
TabIndex = 0
Top = 165
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()
Text2.Text = Afirm(Val(Text1.Text))
End Sub
Private Function Afirm(cj As Integer) As String
Select Case cj
Case Is < 60
Afirm = "不及格"
Case 60 To 69
Afirm = "及格"
Case 70 To 79
Afirm = "中"
Case 80 To 89
Afirm = "良"
Case Is >= 90
Afirm = "优"
End Select
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -