📄 考试系统.frm
字号:
VERSION 5.00
Begin VB.Form Form1
BackColor = &H00FFFF80&
BorderStyle = 1 'Fixed Single
Caption = "考试中..."
ClientHeight = 7440
ClientLeft = 45
ClientTop = 330
ClientWidth = 12000
ControlBox = 0 'False
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 7440
ScaleWidth = 12000
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
BackColor = &H008080FF&
Caption = "交卷"
Height = 855
Left = 8400
Picture = "考试系统.frx":0000
Style = 1 'Graphical
TabIndex = 10
Top = 5880
Width = 975
End
Begin VB.Data Data1
Connect = "Access"
DatabaseName = "stk.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 375
Left = 360
Options = 0
ReadOnly = 0 'False
RecordsetType = 0 'Table
RecordSource = "stk"
Top = 6360
Width = 2655
End
Begin VB.Frame Frame1
BackColor = &H00FFFF80&
Caption = "请选择"
ForeColor = &H00000000&
Height = 3975
Left = 120
TabIndex = 0
Top = 2040
Width = 8175
Begin VB.OptionButton Option4
BackColor = &H00FFFF80&
Caption = "D:"
Height = 495
Left = 720
TabIndex = 9
Top = 2640
Width = 735
End
Begin VB.OptionButton Option3
BackColor = &H00FFFF80&
Caption = "C:"
Height = 495
Left = 720
TabIndex = 8
Top = 1920
Width = 615
End
Begin VB.OptionButton Option2
BackColor = &H00FFFF80&
Caption = "B:"
Height = 495
Left = 720
TabIndex = 7
Top = 1200
Width = 495
End
Begin VB.OptionButton Option1
BackColor = &H00FFFF80&
Caption = "A:"
Height = 615
Left = 720
TabIndex = 5
Top = 480
Width = 735
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
DataField = "checkanswer"
DataSource = "Data1"
BeginProperty Font
Name = "楷体_GB2312"
Size = 36
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 720
Left = 6120
TabIndex = 11
Top = 2880
Width = 2265
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Label4"
DataField = "d"
DataSource = "Data1"
Height = 180
Left = 1920
TabIndex = 4
Top = 2760
Width = 540
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Label3"
DataField = "c"
DataSource = "Data1"
Height = 180
Left = 1920
TabIndex = 3
Top = 2040
Width = 540
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Label2"
DataField = "b"
DataSource = "Data1"
Height = 180
Left = 1920
TabIndex = 2
Top = 1320
Width = 540
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Label1"
DataField = "a"
DataSource = "Data1"
Height = 180
Left = 1920
TabIndex = 1
Top = 600
Width = 540
End
End
Begin VB.Line Line1
BorderStyle = 6 'Inside Solid
X1 = 0
X2 = 10920
Y1 = 720
Y2 = 720
End
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "路慢慢其修远兮 吾将上下而求索"
BeginProperty Font
Name = "楷体_GB2312"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 435
Left = 1320
TabIndex = 12
Top = 240
Width = 6765
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "Label5"
DataField = "question"
DataSource = "Data1"
BeginProperty Font
Name = "楷体_GB2312"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000C0&
Height = 1035
Left = 480
TabIndex = 6
Top = 840
Width = 6105
WordWrap = -1 'True
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()
Data1.Recordset.Close
Me.Hide
Form4.Show
End Sub
Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Command1.BackColor = &H8080FF
End Sub
Private Sub Data1_Reposition()
If Data1.Recordset.Fields("checkanswer") = "A" Then
Option1.Value = True
End If
If Data1.Recordset.Fields("checkanswer") = "B" Then
Option2.Value = True
End If
If Data1.Recordset.Fields("checkanswer") = "C" Then
Option3.Value = True
End If
If Data1.Recordset.Fields("checkanswer") = "D" Then
Option4.Value = True
End If
change
End Sub
Private Sub Form_Load()
Form1.Width = 10000
Form1.Height = 8000
Move (Screen.Width - Form1.Width) / 2, (Screen.Height - Form1.Height) / 2
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Command1.BackColor = &HC0C0FF
End Sub
Private Sub Option1_Click()
change
End Sub
Private Sub Option2_Click()
change
End Sub
Private Sub Option3_Click()
change
End Sub
Private Sub Option4_Click()
change
End Sub
Sub change()
Dim a As Boolean
a = True
Select Case a
Case Option1.Value
Label6.Caption = "A"
Case Option2.Value
Label6.Caption = "B"
Case Option3.Value
Label6.Caption = "C"
Case Option4.Value
Label6.Caption = "D"
End Select
Data1.Recordset.Edit
Data1.Recordset.Fields("checkanswer") = Label6.Caption
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -