📄 frmcheck.vb
字号:
Me.CmdPrev.CausesValidation = True
Me.CmdPrev.Enabled = True
Me.CmdPrev.ForeColor = System.Drawing.SystemColors.ControlText
Me.CmdPrev.Cursor = System.Windows.Forms.Cursors.Default
Me.CmdPrev.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.CmdPrev.TabStop = True
Me.CmdPrev.Name = "CmdPrev"
Me.CmdFirst.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
Me.CmdFirst.Text = "|<"
Me.CmdFirst.Size = New System.Drawing.Size(49, 25)
Me.CmdFirst.Location = New System.Drawing.Point(8, 448)
Me.CmdFirst.TabIndex = 1
Me.CmdFirst.BackColor = System.Drawing.SystemColors.Control
Me.CmdFirst.CausesValidation = True
Me.CmdFirst.Enabled = True
Me.CmdFirst.ForeColor = System.Drawing.SystemColors.ControlText
Me.CmdFirst.Cursor = System.Windows.Forms.Cursors.Default
Me.CmdFirst.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.CmdFirst.TabStop = True
Me.CmdFirst.Name = "CmdFirst"
Me.txtQuestion.AutoSize = False
Me.txtQuestion.Font = New System.Drawing.Font("楷体_GB2312", 14.4!, System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.txtQuestion.Size = New System.Drawing.Size(465, 145)
Me.txtQuestion.Location = New System.Drawing.Point(8, 40)
Me.txtQuestion.ReadOnly = True
Me.txtQuestion.MultiLine = True
Me.txtQuestion.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
Me.txtQuestion.TabIndex = 0
Me.txtQuestion.AcceptsReturn = True
Me.txtQuestion.TextAlign = System.Windows.Forms.HorizontalAlignment.Left
Me.txtQuestion.BackColor = System.Drawing.SystemColors.Window
Me.txtQuestion.CausesValidation = True
Me.txtQuestion.Enabled = True
Me.txtQuestion.ForeColor = System.Drawing.SystemColors.WindowText
Me.txtQuestion.HideSelection = True
Me.txtQuestion.Maxlength = 0
Me.txtQuestion.Cursor = System.Windows.Forms.Cursors.IBeam
Me.txtQuestion.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.txtQuestion.TabStop = True
Me.txtQuestion.Visible = True
Me.txtQuestion.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.txtQuestion.Name = "txtQuestion"
Me.lblCheck.Text = "考生答案"
Me.lblCheck.Font = New System.Drawing.Font("华文行楷", 21.6!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.lblCheck.ForeColor = System.Drawing.Color.Blue
Me.lblCheck.Size = New System.Drawing.Size(185, 25)
Me.lblCheck.Location = New System.Drawing.Point(8, 320)
Me.lblCheck.TabIndex = 9
Me.lblCheck.TextAlign = System.Drawing.ContentAlignment.TopLeft
Me.lblCheck.BackColor = System.Drawing.SystemColors.Control
Me.lblCheck.Enabled = True
Me.lblCheck.Cursor = System.Windows.Forms.Cursors.Default
Me.lblCheck.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.lblCheck.UseMnemonic = True
Me.lblCheck.Visible = True
Me.lblCheck.AutoSize = False
Me.lblCheck.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.lblCheck.Name = "lblCheck"
Me.lblA.Text = "参考答案"
Me.lblA.Font = New System.Drawing.Font("华文行楷", 21.6!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.lblA.ForeColor = System.Drawing.Color.Blue
Me.lblA.Size = New System.Drawing.Size(185, 25)
Me.lblA.Location = New System.Drawing.Point(8, 192)
Me.lblA.TabIndex = 8
Me.lblA.TextAlign = System.Drawing.ContentAlignment.TopLeft
Me.lblA.BackColor = System.Drawing.SystemColors.Control
Me.lblA.Enabled = True
Me.lblA.Cursor = System.Windows.Forms.Cursors.Default
Me.lblA.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.lblA.UseMnemonic = True
Me.lblA.Visible = True
Me.lblA.AutoSize = False
Me.lblA.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.lblA.Name = "lblA"
Me.lblQ.Text = "题目"
Me.lblQ.Font = New System.Drawing.Font("华文行楷", 21.6!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.lblQ.ForeColor = System.Drawing.Color.Blue
Me.lblQ.Size = New System.Drawing.Size(185, 25)
Me.lblQ.Location = New System.Drawing.Point(8, 8)
Me.lblQ.TabIndex = 7
Me.lblQ.TextAlign = System.Drawing.ContentAlignment.TopLeft
Me.lblQ.BackColor = System.Drawing.SystemColors.Control
Me.lblQ.Enabled = True
Me.lblQ.Cursor = System.Windows.Forms.Cursors.Default
Me.lblQ.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.lblQ.UseMnemonic = True
Me.lblQ.Visible = True
Me.lblQ.AutoSize = False
Me.lblQ.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.lblQ.Name = "lblQ"
Me.Controls.Add(CmdCancel)
Me.Controls.Add(CmdOK)
Me.Controls.Add(txtCheck)
Me.Controls.Add(txtAnswer)
Me.Controls.Add(CmdCheck)
Me.Controls.Add(CmdLast)
Me.Controls.Add(CmdNext)
Me.Controls.Add(CmdPrev)
Me.Controls.Add(CmdFirst)
Me.Controls.Add(txtQuestion)
Me.Controls.Add(lblCheck)
Me.Controls.Add(lblA)
Me.Controls.Add(lblQ)
End Sub
#End Region
#Region "升级支持"
Private Shared m_vb6FormDefInstance As frmCheck
Private Shared m_InitializingDefInstance As Boolean
Public Shared Property DefInstance() As frmCheck
Get
If m_vb6FormDefInstance Is Nothing OrElse m_vb6FormDefInstance.IsDisposed Then
m_InitializingDefInstance = True
m_vb6FormDefInstance = New frmCheck()
m_InitializingDefInstance = False
End If
DefInstance = m_vb6FormDefInstance
End Get
Set
m_vb6FormDefInstance = Value
End Set
End Property
#End Region
Dim QSerial As Integer
Dim iCount As Integer
Private Sub View()
QSerial = QPaper.GetQSerial(iCount)
txtQuestion.Text = QPaper.GetQuestion(QSerial)
txtAnswer.Text = QPaper.GetQAnswer(QSerial)
txtCheck.Text = QPaper.GetUserAnswer(QSerial)
End Sub
Private Sub CmdCancel_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CmdCancel.Click
Me.Close()
End Sub
Private Sub CmdCheck_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CmdCheck.Click
Dim QType As MainModule.QuestionType
QType = QPaper.GetType_Renamed(QSerial)
If QType <> MainModule.QuestionType.Blacks And QType <> MainModule.QuestionType.EssayQuestion Then
Exit Sub
End If
Dim S As Single
'UPGRADE_NOTE: str 已升级到 str_Renamed。 单击以获得更多信息:“ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1061"”
Dim str_Renamed As String
DataEnv.rsQstPaper.Open()
DataEnv.rsQstPaper.Filter = "PaperSerial = " & CStr(QSerial)
S = DataEnv.rsQstPaper.Fields("Score").Value
str_Renamed = InputBox("输入分数值(应得分数 " & CStr(S) & ")", "评分", CStr(S))
If IsNumeric(str_Renamed) Then
S = CSng(str_Renamed)
DataEnv.rsQstPaper.Fields("Commence").Value = S
DataEnv.rsQstPaper.Update()
DataEnv.rsQstPaper.Filter = ""
End If
DataEnv.rsQstPaper.Close()
End Sub
Private Sub CmdFirst_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CmdFirst.Click
iCount = 1
View()
End Sub
Private Sub CmdLast_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CmdLast.Click
iCount = QPaper.QuestionNum
View()
End Sub
Private Sub CmdNext_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CmdNext.Click
If iCount < QPaper.QuestionNum Then
iCount = iCount + 1
View()
End If
End Sub
Private Sub CmdOk_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CmdOk.Click
QPaper.Checked = True
Me.Close()
End Sub
Private Sub CmdPrev_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CmdPrev.Click
If iCount > 1 Then
iCount = iCount - 1
View()
End If
End Sub
Private Sub frmCheck_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
Dim Q As Integer
Q = QPaper.QuestionNum
Dim t As MainModule.QuestionType
For iCount = 1 To Q
QSerial = QPaper.GetQSerial(iCount)
t = QPaper.GetType_Renamed(QSerial)
If t = MainModule.QuestionType.RightOrWrong Or t = MainModule.QuestionType.singlesel Or t = MainModule.QuestionType.MultiSel Then
QPaper.Check((QSerial))
QPaper.Checked = True
End If
Next
iCount = 1
View()
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -