📄 5.txt
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form fsc
BorderStyle = 1 'Fixed Single
Caption = "Form1"
ClientHeight = 3975
ClientLeft = 45
ClientTop = 615
ClientWidth = 11025
Icon = "worldfsc.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Moveable = 0 'False
ScaleHeight = 3975
ScaleWidth = 11025
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command3
Caption = "进入第二阶段赛"
Enabled = 0 'False
Height = 375
Left = 6120
TabIndex = 6
Top = 210
Width = 1755
End
Begin VB.Data Data2
Caption = "Data2"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 375
Left = 7560
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 1200
Visible = 0 'False
Width = 3015
End
Begin VB.CommandButton Command2
Caption = "计算积分"
Height = 375
Left = 7320
TabIndex = 5
Top = 2160
Visible = 0 'False
Width = 975
End
Begin VB.CommandButton Command1
Caption = "保存数据"
Height = 375
Left = 7320
TabIndex = 4
Top = 1680
Visible = 0 'False
Width = 975
End
Begin VB.ComboBox Combo1
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 4560
Style = 2 'Dropdown List
TabIndex = 2
Top = 240
Width = 1335
End
Begin MSFlexGridLib.MSFlexGrid msf
Bindings = "worldfsc.frx":030A
Height = 3015
Left = 120
TabIndex = 0
Top = 720
Width = 6975
_ExtentX = 12303
_ExtentY = 5318
_Version = 393216
Rows = 1
Cols = 1
FixedRows = 0
FixedCols = 0
BackColor = 8421376
ForeColor = 16777215
BackColorSel = 8421376
WordWrap = -1 'True
AllowBigSelection= 0 'False
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 375
Left = 240
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 2400
Visible = 0 'False
Width = 2535
End
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 10
Left = 3240
Top = 0
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "比分:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 240
Left = 120
TabIndex = 3
Top = 240
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "比分:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 3840
TabIndex = 1
Top = 240
Width = 720
End
Begin VB.Menu m0
Caption = "mfile"
Begin VB.Menu m1
Caption = "小组第一名"
End
Begin VB.Menu ma
Caption = "-"
End
Begin VB.Menu m2
Caption = "小组第二名"
End
Begin VB.Menu b1
Caption = "-"
End
Begin VB.Menu m3
Caption = "小组第三名"
End
Begin VB.Menu b32
Caption = "-"
End
Begin VB.Menu m4
Caption = "小组第四名"
End
End
End
Attribute VB_Name = "fsc"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim bifen As String
Function auto(ir, ic, bf)
'行列转置
nc = ir Mod 5
nr = ic + (ir \ 5) * 5
'新比分
p = InStr(1, bf, ":", vbTextCompare)
msf.TextMatrix(nr, nc) = Mid(bf, p + 1) + ":" + Mid(bf, 1, p - 1)
End Function
Private Sub Combo1_Click()
On Error Resume Next
msf.SetFocus
End Sub
Private Sub Command1_Click()
Dim tp As String
Data2.DatabaseName = wmdb
Data2.RecordSource = "score"
Data2.Refresh
On Error Resume Next
For i = 0 To msf.Rows - 1
If i Mod 5 <> 0 Then
tp = msf.TextMatrix(i, 0)
Data2.Recordset.FindFirst "name='" + tp + "'"
If Data2.Recordset.NoMatch Then
MsgBox Chr(13) + "数据库错误: " + Chr(13) + Chr(13) + "找不到球队名称" + tp + " ", vbCritical
Exit Sub
End If
Data2.Recordset.Edit
For j = 1 To msf.Cols - 1
Data2.Recordset.Fields(j).Value = msf.TextMatrix(i, j)
Next j
Data2.Recordset.Update
Data2.Refresh
End If
Next i
Data2.Database.Close
End Sub
Private Sub Command2_Click()
'计算积分、球数
For i = 0 To msf.Rows - 1
If i Mod 5 <> 0 Then
n1 = 0
n2 = 0
jf = 0
q1 = 0
q2 = 0
For j = 1 To 4
tp = msf.TextMatrix(i, j)
If tp <> "×" And tp <> "" Then
p = InStr(1, tp, ":", vbTextCompare)
If p > 0 Then
t1 = Mid(tp, 1, p - 1)
t2 = Mid(tp, p + 1)
n1 = Val(t1)
n2 = Val(t2)
If n1 = n2 Then
jf = jf + 1
Else
If n1 > n2 Then
jf = jf + 3
End If
End If
q1 = q1 + n1 - n2
q2 = q2 + n1
End If
End If
Next j
msf.TextMatrix(i, 5) = CStr(jf)
msf.TextMatrix(i, 6) = CStr(q1)
msf.TextMatrix(i, 7) = CStr(q2)
If msf.TextMatrix(i, msf.Cols - 1) = "" Then msf.TextMatrix(i, msf.Cols - 1) = "-"
End If
Next i
End Sub
Private Sub Command3_Click()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -