📄 评分.frm
字号:
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 7
Left = 5940
TabIndex = 7
ToolTipText = "请输入0-10之间的任意分值!"
Top = 180
Width = 675
End
Begin VB.TextBox Text1
Alignment = 2 'Center
BeginProperty Font
Name = "幼圆"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 8
Left = 6755
TabIndex = 6
ToolTipText = "请输入0-10之间的任意分值!"
Top = 180
Width = 675
End
Begin VB.TextBox Text1
Alignment = 2 'Center
BeginProperty Font
Name = "幼圆"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 9
Left = 7590
TabIndex = 5
ToolTipText = "请输入0-10之间的任意分值!"
Top = 180
Width = 675
End
End
Begin VB.Frame Frame1
Height = 735
Left = 300
TabIndex = 2
Top = 1815
Width = 8400
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "选手最后得分"
BeginProperty Font
Name = "华文中宋"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 4290
TabIndex = 21
Top = 225
Width = 1800
End
Begin VB.Label Label6
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 6255
TabIndex = 20
Top = 180
Width = 1740
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "评分人数"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 135
TabIndex = 3
Top = 330
Width = 840
End
End
Begin VB.Timer Timer3
Enabled = 0 'False
Interval = 500
Left = -120
Top = 1470
End
Begin VB.Timer Timer2
Enabled = 0 'False
Interval = 500
Left = -135
Top = 885
End
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 500
Left = -105
Top = 375
End
Begin VB.CommandButton Command2
Caption = "清除评分"
Height = 420
Left = 7005
TabIndex = 1
Top = 2745
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "开始评分"
Height = 405
Left = 5505
TabIndex = 0
Top = 2775
Width = 1215
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim mmax, mmin, mmin_n, mmax_n, tt, cs, gs As Integer
Private Sub Combo1_Click()
For i = 1 To 10
Text1(i - 1).Enabled = True
Text1(i - 1).Text = ""
Text1(i - 1).BackColor = vbWhite
Next i
For i = 9 To Combo1.List(Combo1.ListIndex) Step -1
Text1(i).Enabled = False
Text1(i).BackColor = &H8000000F
Next
gs = Val(Combo1.List(Combo1.ListIndex))
End Sub
Private Sub Command1_Click()
'Picture1.Cls
mmin = Val(Text1(0))
mmax = Val(Text1(0))
tt = 0
mmax_n = 0
mmin_n = 0
For i = 0 To gs - 1
If Val(Text1(i)) < mmin Then
mmin = Val(Text1(i))
mmin_n = i
End If
If Val(Text1(i)) > mmax Then
mmax = Val(Text1(i))
mmax_n = i
End If
tt = tt + Val(Text1(i))
Next i
If mmin_n = mmax_n Then mmax_n = mmax_n + 1
tt = tt - mmin - mmax
Timer1.Enabled = True
'Label8.Caption = mmin_n & ";"
'Label9.Caption = mmax_n & ";"
End Sub
Private Sub Command2_Click()
For i = 0 To 9
Text1(i) = ""
Text1(i).ForeColor = vbBlack
Next i
Label3 = ""
Label4 = ""
Label6 = ""
Label3.ForeColor = vbBlack
Label4.ForeColor = vbBlack
End Sub
Private Sub Form_Load()
cs = 0
For i = 3 To 10
Combo1.AddItem i
Next
For i = 9 To 3 Step -1
Text1(i).Enabled = False
Text1(i).BackColor = &H8000000F
'Text1(i).ToolTipText = "请输入0-10之间的任意分值!"
Next
gs = 3
Combo1.ListIndex = 0
End Sub
Private Sub combo1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
'Label8.Caption = combo1.List(combo1.ListIndex)
End Sub
Private Sub Text1_LostFocus(Index As Integer)
Dim text_error As Integer
text_error = -1
For i = 0 To 9
If Val(Text1(i).Text) > 10 Or Val(Text1(i).Text) < 0 Or Len(Trim("" & Text1(i).Text)) > 3 Then
text_error = i
End If
Next i
If text_error >= 0 Then Text1(text_error).SetFocus
End Sub
Private Sub Timer1_Timer()
If cs < 6 Then
If cs Mod 2 = 1 Then
Label3.Caption = mmax: Text1(mmax_n).ForeColor = vbBlack
Else
Label3.Caption = "": Text1(mmax_n).ForeColor = vbRed
End If
Else
Timer1.Enabled = False
cs = -1
Label3.Caption = mmax: Text1(mmax_n).ForeColor = vbRed
Timer2.Enabled = True
End If
cs = cs + 1
'Picture1.Print "mmax:" & mmax & "mmin:" & mmin & "mmin_n:" & mmin_n & "mmax_n:" & mmax_n
End Sub
Private Sub Timer2_Timer()
If cs < 6 Then
If cs Mod 2 = 1 Then
Label4.Caption = mmin: Text1(mmin_n).ForeColor = vbBlack
Else
Label4.Caption = "": Text1(mmin_n).ForeColor = vbRed
End If
Else
Timer2.Enabled = False
Timer3.Enabled = True
cs = -1
Label4.Caption = mmin: Text1(mmin_n).ForeColor = vbRed
End If
cs = cs + 1
End Sub
Private Sub Timer3_Timer()
Label6.Caption = Format(tt / (gs - 2), "0.00")
Timer3.Enabled = False
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -