📄 设置免费上机.frm
字号:
Index = 1
Left = 6960
TabIndex = 21
Text = "2"
Top = 840
Width = 1455
End
Begin VB.ComboBox cb_jsz
Height = 300
Index = 1
Left = 960
TabIndex = 20
Text = "19"
Top = 840
Width = 1575
End
Begin VB.ComboBox cb_xqj
Height = 300
Index = 1
Left = 3840
TabIndex = 19
Text = "1"
Top = 360
Width = 1335
End
Begin VB.ComboBox cb_dsz
Height = 300
Index = 1
Left = 3840
TabIndex = 18
Text = "单"
Top = 840
Width = 1335
End
Begin VB.ComboBox cb_djjk
Height = 300
Index = 1
Left = 6960
TabIndex = 17
Text = "1"
Top = 360
Width = 1455
End
Begin VB.Label Label13
Caption = "开始周:"
Height = 375
Left = 240
TabIndex = 28
Top = 360
Width = 735
End
Begin VB.Label Label12
Caption = "共几节课:"
Height = 255
Left = 5760
TabIndex = 27
Top = 840
Width = 975
End
Begin VB.Label Label6
Caption = "结束周:"
Height = 375
Left = 240
TabIndex = 26
Top = 840
Width = 735
End
Begin VB.Label Label5
Caption = "星期几:"
Height = 255
Left = 3000
TabIndex = 25
Top = 360
Width = 735
End
Begin VB.Label Label4
Caption = "单双周:"
Height = 255
Left = 3000
TabIndex = 24
Top = 840
Width = 855
End
Begin VB.Label Label3
Caption = "第几节课:"
Height = 255
Left = 5760
TabIndex = 23
Top = 360
Width = 975
End
Begin VB.Shape Shape6
Height = 1095
Left = 120
Top = 240
Width = 2535
End
Begin VB.Shape Shape5
Height = 1095
Left = 2880
Top = 240
Width = 2535
End
Begin VB.Shape Shape4
Height = 1095
Left = 5640
Top = 240
Width = 2895
End
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 375
Left = 2760
TabIndex = 7
Top = 6600
Width = 975
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 1440
TabIndex = 6
Top = 6600
Width = 1095
End
Begin VB.Frame Frame1
Caption = "免费时间1"
Height = 1455
Index = 0
Left = 240
TabIndex = 0
Top = 480
Width = 8895
Begin VB.ComboBox cb_djjk
Height = 300
Index = 0
Left = 6960
TabIndex = 15
Text = "1"
Top = 360
Width = 1455
End
Begin VB.ComboBox cb_dsz
Height = 300
Index = 0
Left = 3840
TabIndex = 13
Text = "单"
Top = 840
Width = 1335
End
Begin VB.ComboBox cb_xqj
Height = 300
Index = 0
Left = 3840
TabIndex = 11
Text = "1"
Top = 360
Width = 1335
End
Begin VB.ComboBox cb_jsz
Height = 300
Index = 0
Left = 960
TabIndex = 9
Text = "19"
Top = 840
Width = 1575
End
Begin VB.ComboBox cb_gjjk
Height = 300
Index = 0
Left = 6960
TabIndex = 4
Text = "2"
Top = 840
Width = 1455
End
Begin VB.ComboBox cb_ksz
Height = 300
Index = 0
ItemData = "设置免费上机.frx":0015
Left = 960
List = "设置免费上机.frx":0017
TabIndex = 3
Text = "1"
Top = 360
Width = 1575
End
Begin VB.Shape Shape3
Height = 1095
Left = 5640
Top = 240
Width = 2895
End
Begin VB.Shape Shape2
Height = 1095
Left = 2880
Top = 240
Width = 2535
End
Begin VB.Shape Shape1
Height = 1095
Left = 120
Top = 240
Width = 2535
End
Begin VB.Label Label11
Caption = "第几节课:"
Height = 255
Left = 5760
TabIndex = 14
Top = 360
Width = 975
End
Begin VB.Label Label10
Caption = "单双周:"
Height = 255
Left = 3000
TabIndex = 12
Top = 840
Width = 855
End
Begin VB.Label Label9
Caption = "星期几:"
Height = 255
Left = 3000
TabIndex = 10
Top = 360
Width = 735
End
Begin VB.Label Label8
Caption = "结束周:"
Height = 375
Left = 240
TabIndex = 8
Top = 840
Width = 735
End
Begin VB.Label Label2
Caption = "共几节课:"
Height = 255
Left = 5760
TabIndex = 2
Top = 840
Width = 975
End
Begin VB.Label Label1
Caption = "开始周:"
Height = 375
Left = 240
TabIndex = 1
Top = 360
Width = 735
End
End
Begin VB.Label Label21
Caption = "本学期第一周从3月5日开始"
Height = 495
Left = 7560
TabIndex = 44
Top = 5760
Width = 3135
End
Begin VB.Label Label20
Caption = "当前日期:"
Height = 255
Left = 480
TabIndex = 42
Top = 5760
Width = 1215
End
Begin VB.Label Label7
Caption = "选择班级:"
Height = 255
Left = 9240
TabIndex = 5
Top = 240
Width = 975
End
End
Attribute VB_Name = "Form4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
For i = 0 To 2
Adodc1.Recordset.Fields(2 + 6 * i) = Val(cb_ksz(i).Text)
Adodc1.Recordset.Fields(2 + 6 * i + 1) = Val(cb_jsz(i).Text)
Adodc1.Recordset.Fields(2 + 6 * i + 2) = Val(cb_xqj(i).Text)
Adodc1.Recordset.Fields(2 + 6 * i + 3) = cb_dsz(i).Text
Adodc1.Recordset.Fields(2 + 6 * i + 4) = Val(cb_djjk(i).Text)
Adodc1.Recordset.Fields(2 + 6 * i + 5) = Val(cb_gjjk(i).Text)
Next i
Adodc1.Recordset.Update
Unload Me
End Sub
Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
For i = 0 To 2
cb_ksz(i).Text = Adodc1.Recordset.Fields(2 + 6 * i)
cb_jsz(i).Text = Adodc1.Recordset.Fields(2 + 6 * i + 1)
cb_xqj(i).Text = Adodc1.Recordset.Fields(2 + 6 * i + 2)
cb_dsz(i).Text = Adodc1.Recordset.Fields(2 + 6 * i + 3)
cb_djjk(i).Text = Adodc1.Recordset.Fields(2 + 6 * i + 4)
cb_gjjk(i).Text = Adodc1.Recordset.Fields(2 + 6 * i + 5)
Next i
End Sub
Private Sub Form_Load()
For i = 0 To 2
For j = 1 To 19
cb_ksz(i).AddItem j
cb_jsz(i).AddItem j
Next j
For j = 1 To 7
cb_xqj(i).AddItem j
Next j
cb_dsz(i).AddItem "单周"
cb_dsz(i).AddItem "双周"
cb_dsz(i).AddItem "每周"
For j = 1 To 9
cb_djjk(i).AddItem j
Next j
For j = 1 To 3
cb_gjjk(i).AddItem j
Next j
Next i
current
End Sub
Sub current()
Text1.Text = Date & " 星期" & (Weekday(Date) - 1) & "时间:" & time
l = DateDiff("d", Text3.Text, Date)
Label21.Caption = "本学期第一周从" & Text3.Text & "开始"
Text2.Text = "今天是第" & l \ 7 + 1 & "周,星期" & (Weekday(Date) - 1)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -