⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmfillblank.frm

📁 在线试题库,用ASP写的程序
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form frmFillBlank 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "共5道填空题"
   ClientHeight    =   4890
   ClientLeft      =   135
   ClientTop       =   0
   ClientWidth     =   7350
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4890
   ScaleWidth      =   7350
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Begin VB.Frame Frame1 
      Height          =   600
      Left            =   2565
      TabIndex        =   6
      Top             =   3690
      Width           =   4695
      Begin VB.CommandButton cmdReturn 
         Caption         =   "返回"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   3735
         TabIndex        =   11
         Top             =   225
         Width           =   825
      End
      Begin VB.CommandButton cmdLast 
         Caption         =   "最后题"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   2835
         TabIndex        =   10
         Top             =   225
         Width           =   825
      End
      Begin VB.CommandButton cmdPre 
         Caption         =   "上一题"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   1935
         TabIndex        =   9
         Top             =   225
         Width           =   825
      End
      Begin VB.CommandButton cmdNext 
         Caption         =   "下一题"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   1035
         TabIndex        =   8
         Top             =   225
         Width           =   825
      End
      Begin VB.CommandButton cmdFrist 
         Caption         =   "第一题"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   135
         TabIndex        =   7
         Top             =   225
         Width           =   825
      End
   End
   Begin VB.TextBox txtAnswer 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   4140
      TabIndex        =   4
      Top             =   2340
      Width           =   3075
   End
   Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1 
      Height          =   4650
      Left            =   45
      TabIndex        =   1
      Top             =   135
      Width           =   2400
      _ExtentX        =   4233
      _ExtentY        =   8202
      _Version        =   393216
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "请输入您的答案:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   180
      Left            =   2700
      TabIndex        =   5
      Top             =   2430
      Width           =   1440
   End
   Begin VB.Label lblNum 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "1"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   210
      Left            =   3285
      TabIndex        =   3
      Top             =   135
      Width           =   135
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "题号:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   210
      Left            =   2610
      TabIndex        =   2
      Top             =   135
      Width           =   690
   End
   Begin VB.Label lblTitle 
      BackColor       =   &H00FFFFFF&
      Caption         =   "题文"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1455
      Left            =   2610
      TabIndex        =   0
      Top             =   540
      Width           =   4605
   End
End
Attribute VB_Name = "frmFillBlank"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit


Private Sub cmdFrist_Click()
rstFillBlank.MoveFirst
lblTitle.Caption = rstFillBlank.Fields("题文")
lblNum.Caption = 1
txtAnswer.Text = MSFlexGrid1.TextMatrix(Val(lblNum.Caption), 1)

End Sub

Private Sub cmdLast_Click()
rstFillBlank.MoveLast
lblTitle.Caption = rstFillBlank.Fields("题文")
lblNum.Caption = fillNUM
txtAnswer.Text = MSFlexGrid1.TextMatrix(Val(lblNum.Caption), 1)

End Sub

Private Sub cmdNext_Click()
rstFillBlank.MoveNext
If rstFillBlank.EOF Then
 rstFillBlank.MoveLast
 Exit Sub
End If
lblNum.Caption = Val(lblNum.Caption) + 1
lblTitle.Caption = rstFillBlank.Fields("题文")
txtAnswer.Text = MSFlexGrid1.TextMatrix(Val(lblNum.Caption), 1)

End Sub

Private Sub cmdPre_Click()
rstFillBlank.MovePrevious
If rstFillBlank.BOF Then
 rstFillBlank.MoveFirst
 Exit Sub
End If
lblNum.Caption = Val(lblNum.Caption) - 1
lblTitle.Caption = rstFillBlank.Fields("题文")
txtAnswer.Text = MSFlexGrid1.TextMatrix(Val(lblNum.Caption), 1)

End Sub

Private Sub cmdReturn_Click()
Dim i As Integer
For i = 1 To fillNUM
 strFillBlank(i) = MSFlexGrid1.TextMatrix(i, 1)
Next i

frmTime.lblTitle.Caption = "隐藏考试说明窗体"
frmExam.Show
Unload Me

End Sub

Private Sub Form_Load()
Dim strSQL As String
Dim i As Integer
With MSFlexGrid1
 .AllowUserResizing = flexResizeColumns
 .Cols = 2
 .Rows = fillNUM + 1
 .FixedCols = 0
 .TextMatrix(0, 0) = "题号"
 .TextMatrix(0, 1) = "考生答案"
End With
For i = 1 To fillNUM
 MSFlexGrid1.TextMatrix(i, 0) = i
Next i
For i = 1 To fillNUM
 MSFlexGrid1.TextMatrix(i, 1) = strFillBlank(i)
Next i

If fillFlag = True Then
 rstFillBlank.Close
 fillFlag = False
End If
strSQL = "Select * from FillBlank where 卷号=" & numEJH
rstFillBlank.Open strSQL, cnn, adOpenStatic, adLockOptimistic
fillFlag = True
rstFillBlank.MoveFirst
i = 1
While Not rstFillBlank.EOF
 If i <= fillNUM Then
  strFiAn(i) = rstFillBlank.Fields("答案")
  numFiVa(i) = rstFillBlank.Fields("分值")
 End If
 rstFillBlank.MoveNext
 i = i + 1
Wend
rstFillBlank.MoveFirst
lblTitle.Caption = rstFillBlank.Fields("题文")

End Sub

Private Sub Form_Unload(Cancel As Integer)
cmdReturn_Click
End Sub

Private Sub txtAnswer_Change()
MSFlexGrid1.TextMatrix(Val(lblNum.Caption), 1) = txtAnswer.Text

End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -