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

📄 form_cjxt22.frm

📁 手工出卷和自动出卷以及审核试卷和修改试卷
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form Form_CJXT22 
   Caption         =   "自动出卷"
   ClientHeight    =   6480
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   8880
   LinkTopic       =   "Form2"
   ScaleHeight     =   6480
   ScaleWidth      =   8880
   StartUpPosition =   3  '窗口缺省
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   900
      Top             =   150
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   32
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   1
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form_CJXT22.frx":0000
            Key             =   "退出"
            Object.Tag             =   "Exit"
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.Toolbar Toolbar1 
      Align           =   1  'Align Top
      Height          =   420
      Left            =   0
      TabIndex        =   23
      Top             =   0
      Width           =   8880
      _ExtentX        =   15663
      _ExtentY        =   741
      ButtonWidth     =   1032
      Appearance      =   1
      ImageList       =   "ImageList1"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   1
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "Exit"
            Object.ToolTipText     =   "退出"
            ImageIndex      =   1
         EndProperty
      EndProperty
   End
   Begin VB.CommandButton Command3 
      Caption         =   "下一步"
      Height          =   615
      Left            =   5460
      Picture         =   "Form_CJXT22.frx":0194
      Style           =   1  'Graphical
      TabIndex        =   15
      Top             =   5520
      Width           =   1005
   End
   Begin VB.CommandButton Command1 
      Caption         =   "上一步"
      Height          =   615
      Left            =   2340
      Picture         =   "Form_CJXT22.frx":0318
      Style           =   1  'Graphical
      TabIndex        =   14
      Top             =   5520
      Width           =   1065
   End
   Begin VB.Frame Frame1 
      Caption         =   "选择出卷试题"
      Height          =   4335
      Left            =   930
      TabIndex        =   0
      Top             =   960
      Width           =   6735
      Begin VB.TextBox Text_Score 
         Height          =   270
         Left            =   1860
         TabIndex        =   21
         Top             =   3840
         Width           =   1575
      End
      Begin VB.TextBox score5 
         Height          =   270
         Left            =   4200
         TabIndex        =   13
         Top             =   3252
         Width           =   1215
      End
      Begin VB.TextBox score4 
         Height          =   270
         Left            =   4200
         TabIndex        =   12
         Top             =   2664
         Width           =   1215
      End
      Begin VB.TextBox score3 
         Height          =   270
         Left            =   4200
         TabIndex        =   11
         Top             =   2076
         Width           =   1215
      End
      Begin VB.TextBox score2 
         Height          =   270
         Left            =   4200
         TabIndex        =   10
         Top             =   1488
         Width           =   1215
      End
      Begin VB.TextBox score1 
         Height          =   270
         Left            =   4200
         TabIndex        =   9
         Top             =   900
         Width           =   1215
      End
      Begin VB.TextBox num5 
         Height          =   270
         Left            =   1860
         TabIndex        =   8
         Top             =   3252
         Width           =   1575
      End
      Begin VB.TextBox num4 
         Height          =   270
         Left            =   1860
         TabIndex        =   7
         Top             =   2664
         Width           =   1575
      End
      Begin VB.TextBox num3 
         Height          =   270
         Left            =   1860
         TabIndex        =   6
         Top             =   2076
         Width           =   1575
      End
      Begin VB.TextBox num2 
         Height          =   270
         Left            =   1860
         TabIndex        =   5
         Top             =   1488
         Width           =   1575
      End
      Begin VB.TextBox num1 
         Height          =   270
         Left            =   1860
         TabIndex        =   4
         Top             =   900
         Width           =   1575
      End
      Begin VB.Label Label9 
         Caption         =   "总分值"
         Height          =   180
         Left            =   750
         TabIndex        =   22
         Top             =   3900
         Width           =   540
      End
      Begin VB.Label Label8 
         AutoSize        =   -1  'True
         Caption         =   "综合题"
         Height          =   180
         Left            =   750
         TabIndex        =   20
         Top             =   3306
         Width           =   540
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         Caption         =   "判断题"
         Height          =   180
         Left            =   750
         TabIndex        =   19
         Top             =   2712
         Width           =   540
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         Caption         =   "填空题"
         Height          =   180
         Left            =   750
         TabIndex        =   18
         Top             =   2118
         Width           =   540
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         Caption         =   "多选题"
         Height          =   180
         Left            =   750
         TabIndex        =   17
         Top             =   1524
         Width           =   540
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         Caption         =   "单选题"
         Height          =   180
         Left            =   750
         TabIndex        =   16
         Top             =   930
         Width           =   540
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "分值"
         Height          =   180
         Left            =   4440
         TabIndex        =   3
         Top             =   480
         Width           =   360
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "题数"
         Height          =   180
         Left            =   2340
         TabIndex        =   2
         Top             =   480
         Width           =   360
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "试题类型"
         Height          =   180
         Left            =   720
         TabIndex        =   1
         Top             =   480
         Width           =   720
      End
   End
End
Attribute VB_Name = "Form_CJXT22"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs1 As New ADODB.Recordset
Dim rs2 As New ADODB.Recordset
Dim rs3 As New ADODB.Recordset
Dim rs4 As New ADODB.Recordset
Dim rs5 As New ADODB.Recordset
Private Sub Command1_Click()
Form_CJXT22.Hide
Form_CJXT21.Show
End Sub

Private Sub Command3_Click()
   Dim tm1, tm2, tm3, tm4, tm5 As Integer
   tm1 = Val(num1.Text)
   tm2 = Val(num2.Text)
   tm3 = Val(num3.Text)
   tm4 = Val(num4.Text)
   tm5 = Val(num5.Text)
    Dim n1, n2, n3, n4, n5 As Integer
    rs1.Open "singlerselection", Con, adOpenDynamic, adLockPessimistic
    rs2.Open "multiselection", Con, adOpenDynamic, adLockPessimistic
    rs3.Open "blank", Con, adOpenDynamic, adLockPessimistic
    rs4.Open "tftable", Con, adOpenDynamic, adLockPessimistic
    rs5.Open "question", Con, adOpenDynamic, adLockPessimistic
    n1 = rs1.RecordCount
    n2 = rs2.RecordCount
    n3 = rs3.RecordCount
    n4 = rs4.RecordCount
    n5 = rs5.RecordCount
    
   Dim i, j As Integer
   For i = 1 To tm1
    j = Int(Rnd(i) * n1 + 1)
    Cmd.CommandText = "insert into shijuan(ID,score,difficult,content, opA, opB, opC,opD) select ID,score,difficult,content, optionA, optionB, optionC,optionD from singlerselection where difficult='C' and ID like '%" & j & "'"
    Cmd.Execute
   Next
  
   For i = 1 To tm2
    j = Int(Rnd(i) * n2 + 1)
    Cmd.CommandText = "insert into shijuan(ID,score,difficult,content, opA, opB, opC,opD) select ID,score,difficult,content, optionA, optionB, optionC,optionD from multiselection where difficult='C' and ID like '%" & j & "'"
   Cmd.Execute
   Next
   
    For i = 1 To tm3
    j = Int(Rnd(i) * n3 + 1)
    Cmd.CommandText = "insert into shijuan(ID,score,difficult,content) select ID,score,difficult,content from blank where difficult='C' and ID like '%" & j & "'"
   Cmd.Execute
   Next
   
   For i = 1 To tm4
    j = Int(Rnd(i) * n4 + 1)
    Cmd.CommandText = "insert into shijuan(ID,score,difficult,content) select ID,score,difficult,content from tftable where difficult='C' and ID like '%" & j & "'"
   Cmd.Execute
   Next

   For i = 1 To tm5
    j = Int(Rnd(i) * n5 + 1)
    Cmd.CommandText = "insert into shijuan(ID,score,difficult,content) select ID,score,difficult,content from question where difficult='C' and ID like '%" & j & "'"
   Cmd.Execute
   Next
   Form_CJXT22.Hide
   Form_CJXT23.Show
End Sub
Private Sub Form_Load()
  Height = 7800
  Width = 8700
  Left = 4700
  Top = 1700
End Sub

Private Sub num1_Change()
If num1.Text = "" Then
score1.Text = ""
Else
score1.Text = 5 * num1.Text
End If
Text_Score.Text = Val(score1.Text) + Val(score2.Text) + Val(score3.Text) + Val(score4.Text) + Val(score5.Text)
End Sub

Private Sub num2_Change()
If num2.Text = "" Then
score2.Text = ""
Else
score2.Text = 5 * num1.Text
End If
Text_Score.Text = Val(score1.Text) + Val(score2.Text) + Val(score3.Text) + Val(score4.Text) + Val(score5.Text)
End Sub

Private Sub num3_Change()
If num3.Text = "" Then
score3.Text = ""
Else
score3.Text = 5 * num2.Text
End If
Text_Score.Text = Val(score1.Text) + Val(score2.Text) + Val(score3.Text) + Val(score4.Text) + Val(score5.Text)
End Sub

Private Sub num4_Change()
If num4.Text = "" Then
score4.Text = ""
Else
score4.Text = 5 * num4.Text
End If
Text_Score.Text = Val(score1.Text) + Val(score2.Text) + Val(score3.Text) + Val(score4.Text) + Val(score5.Text)
End Sub

Private Sub num5_Change()
If num5.Text = "" Then
score5.Text = ""
Else
score5.Text = 5 * num5.Text
End If
Text_Score.Text = Val(score1.Text) + Val(score2.Text) + Val(score3.Text) + Val(score4.Text) + Val(score5.Text)
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
    Select Case Button.Key
           Case "Exit"
               Unload Me
    End Select
End Sub

⌨️ 快捷键说明

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