大家帮忙写个注释,我是外行,急用,非常感谢~!~!
5.4.7 选课系统Private Sub Command1_Click(Index As Integer)
Dim n As Integer
n = Index
Select Case n
Case 0
Text1(0).Enabled = True
Text1(1).Enabled = True
Text1(2).Enabled = True
Adodc1.Recordset.AddNew
Case 1
Text1(0).Text = ""
Text1(1).Text = ""
Text1(2).Text = ""
Text1(0).Enabled = False
Text1(1).Enabled = False
Text1(2).Enabled = False
Case 2
Adodc1.Recordset.Update
Text1(0).Text = ""
Text1(1).Text = ""
Text1(2).Text = ""
Text1(0).Enabled = False
Text1(1).Enabled = False
Text1(2).Enabled = False
End Select
End Sub
Private Sub Form_Load()
Text1(0).Text = ""
Text1(1).Text = ""
Text1(2).Text = ""
Label1.Caption = "同学们好,开始选课啦!"
Label4.Caption = "请同学们及时填写,10分钟后会自动退出选课系统!"
Timer2.Enabled = True
Text2.Text = 600
Label5.Caption = Format(Time, "hh:mm:ss AM/PM")
Text1(0).Enabled = False
Text1(1).Enabled = False
Text1(2).Enabled = False
End Sub
Private Sub Picture1_Click(Index As Integer)
Dim n As Integer
n = Index
Select Case n
Case 0
Form5.Show
Form6.Hide
Form7.Hide
Form1.Hide
Case 1
Form6.Show
Form5.Hide
Form7.Hide
Form1.Hide
Case 2
Form1.Show
Form5.Hide
Form7.Hide
Form6.Hide
End Select
End Sub
Private Sub Picture2_Click()
Form8.Show
End Sub
Private Sub Timer1_Timer()
If Label1.Left + Label1.Width > 0 Then
Label1.Move Label1.Left - 20
Else
Label1.Left = Form1.ScaleWidth
End If
End Sub
Private Sub Timer2_Timer()
If Text2.Text = 0 Then
MsgBox "时间已到", vbExclamation, ""
Form1.Show
Unload Me
Else
Text2.Text = Val(Text2.Text) - 1
End If
End Sub
5.4.8 选课手册
Private Sub Command1_Click()
Unload Me
Form7.Show
End Sub
Private Sub Form_Load()
End Sub