www.pudn.com > textmanager.rar > FrmKaoShi.frm, change:2005-04-12,size:62056b


VERSION 5.00 
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX" 
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX" 
Begin VB.Form FrmKaoShi  
   BackColor       =   &H00C0C0C0& 
   BorderStyle     =   0  'None 
   Caption         =   "Form1" 
   ClientHeight    =   9000 
   ClientLeft      =   0 
   ClientTop       =   0 
   ClientWidth     =   12000 
   LinkTopic       =   "Form1" 
   LockControls    =   -1  'True 
   Picture         =   "FrmKaoShi.frx":0000 
   ScaleHeight     =   9000 
   ScaleWidth      =   12000 
   ShowInTaskbar   =   0   'False 
   StartUpPosition =   3  '窗口缺省 
   WindowState     =   2  'Maximized 
   Begin VB.PictureBox Picture1  
      BorderStyle     =   0  'None 
      Height          =   750 
      Left            =   0 
      Picture         =   "FrmKaoShi.frx":A00B 
      ScaleHeight     =   750 
      ScaleWidth      =   12075 
      TabIndex        =   36 
      Top             =   15 
      Width           =   12075 
      Begin VB.Label LabScore  
         AutoSize        =   -1  'True 
         BackStyle       =   0  'Transparent 
         Caption         =   "总分:100分" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   12 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         ForeColor       =   &H000000FF& 
         Height          =   240 
         Left            =   8100 
         TabIndex        =   40 
         Top             =   450 
         Width           =   1200 
      End 
      Begin VB.Label Label8  
         AutoSize        =   -1  'True 
         BackStyle       =   0  'Transparent 
         Caption         =   "02:00:60" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   18 
            Charset         =   134 
            Weight          =   700 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         ForeColor       =   &H000000FF& 
         Height          =   360 
         Left            =   10125 
         TabIndex        =   39 
         Top             =   210 
         Width           =   1575 
      End 
      Begin VB.Label Label7  
         AutoSize        =   -1  'True 
         BackStyle       =   0  'Transparent 
         Caption         =   "剩余时间:" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   12 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         ForeColor       =   &H00FF0000& 
         Height          =   240 
         Left            =   8970 
         TabIndex        =   38 
         Top             =   120 
         Width           =   1200 
      End 
      Begin VB.Label LabTitle  
         Alignment       =   2  'Center 
         BackStyle       =   0  'Transparent 
         Caption         =   "北华大学第一次期末考试" 
         BeginProperty Font  
            Name            =   "楷体_GB2312" 
            Size            =   18 
            Charset         =   134 
            Weight          =   700 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         ForeColor       =   &H000000C0& 
         Height          =   465 
         Left            =   45 
         TabIndex        =   37 
         Top             =   165 
         Width           =   7845 
      End 
   End 
   Begin MSComctlLib.ImageList ImageList1  
      Left            =   3000 
      Top             =   4920 
      _ExtentX        =   1005 
      _ExtentY        =   1005 
      BackColor       =   -2147483643 
      ImageWidth      =   18 
      ImageHeight     =   18 
      MaskColor       =   12632256 
      _Version        =   393216 
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}  
         NumListImages   =   2 
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "FrmKaoShi.frx":C0D6 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "FrmKaoShi.frx":C3FE 
            Key             =   "" 
         EndProperty 
      EndProperty 
   End 
   Begin VB.PictureBox PicXZ  
      BorderStyle     =   0  'None 
      Height          =   7455 
      Left            =   -30 
      ScaleHeight     =   7455 
      ScaleWidth      =   12015 
      TabIndex        =   0 
      Top             =   -15 
      Width           =   12015 
      Begin VB.CheckBox Check1  
         Appearance      =   0  'Flat 
         BackColor       =   &H00FFB4B8& 
         Caption         =   "D" 
         ForeColor       =   &H80000008& 
         Height          =   210 
         Index           =   3 
         Left            =   8220 
         TabIndex        =   31 
         Top             =   5355 
         Width           =   495 
      End 
      Begin VB.CheckBox Check1  
         Appearance      =   0  'Flat 
         BackColor       =   &H00FFB4B8& 
         Caption         =   "C" 
         ForeColor       =   &H80000008& 
         Height          =   210 
         Index           =   2 
         Left            =   7350 
         TabIndex        =   30 
         Top             =   5355 
         Width           =   495 
      End 
      Begin VB.CheckBox Check1  
         Appearance      =   0  'Flat 
         BackColor       =   &H00FFB4B8& 
         Caption         =   "B" 
         ForeColor       =   &H80000008& 
         Height          =   210 
         Index           =   1 
         Left            =   6375 
         TabIndex        =   29 
         Top             =   5355 
         Width           =   495 
      End 
      Begin VB.CheckBox Check1  
         Appearance      =   0  'Flat 
         BackColor       =   &H00FFB4B8& 
         Caption         =   "A" 
         ForeColor       =   &H80000008& 
         Height          =   210 
         Index           =   0 
         Left            =   5415 
         TabIndex        =   28 
         Top             =   5355 
         Width           =   495 
      End 
      Begin RichTextLib.RichTextBox TXTView  
         Height          =   3990 
         Left            =   3225 
         TabIndex        =   1 
         Top             =   900 
         Width           =   7260 
         _ExtentX        =   12806 
         _ExtentY        =   7038 
         _Version        =   393217 
         ReadOnly        =   -1  'True 
         ScrollBars      =   2 
         Appearance      =   0 
         TextRTF         =   $"FrmKaoShi.frx":C852 
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
      End 
      Begin MSComctlLib.TreeView TrVTM  
         Height          =   5790 
         Left            =   900 
         TabIndex        =   2 
         Top             =   915 
         Width           =   2070 
         _ExtentX        =   3651 
         _ExtentY        =   10213 
         _Version        =   393217 
         Indentation     =   265 
         LabelEdit       =   1 
         LineStyle       =   1 
         Style           =   7 
         ImageList       =   "ImageList1" 
         BorderStyle     =   1 
         Appearance      =   0 
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}  
            Name            =   "宋体" 
            Size            =   12 
            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            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         ForeColor       =   &H000000C0& 
         Height          =   210 
         Left            =   4515 
         TabIndex        =   32 
         Top             =   5355 
         Width           =   630 
      End 
      Begin VB.Shape Shape1  
         Height          =   420 
         Left            =   4125 
         Top             =   5250 
         Width           =   4890 
      End 
   End 
   Begin VB.PictureBox PicWD  
      BorderStyle     =   0  'None 
      Height          =   7455 
      Left            =   825 
      ScaleHeight     =   7455 
      ScaleWidth      =   12015 
      TabIndex        =   7 
      Top             =   45 
      Visible         =   0   'False 
      Width           =   12015 
      Begin VB.TextBox RtbWDDA  
         Appearance      =   0  'Flat 
         BackColor       =   &H00E8F4F8& 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   3060 
         Left            =   3240 
         MultiLine       =   -1  'True 
         ScrollBars      =   2  'Vertical 
         TabIndex        =   35 
         Top             =   4095 
         Width           =   7260 
      End 
      Begin VB.ListBox LstWD  
         Appearance      =   0  'Flat 
         BackColor       =   &H00E8F4F8& 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   12 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   5790 
         Left            =   1140 
         TabIndex        =   20 
         Top             =   900 
         Width           =   1740 
      End 
      Begin RichTextLib.RichTextBox RtbWDTM  
         Height          =   2670 
         Left            =   3240 
         TabIndex        =   8 
         Top             =   915 
         Width           =   7260 
         _ExtentX        =   12806 
         _ExtentY        =   4710 
         _Version        =   393217 
         BackColor       =   15267064 
         ReadOnly        =   -1  'True 
         ScrollBars      =   2 
         Appearance      =   0 
         TextRTF         =   $"FrmKaoShi.frx":CADC 
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
      End 
      Begin VB.Label LabWDSave  
         Alignment       =   2  'Center 
         Appearance      =   0  'Flat 
         BackColor       =   &H0080C0FF& 
         BorderStyle     =   1  'Fixed Single 
         Caption         =   "保存" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   14.25 
            Charset         =   134 
            Weight          =   700 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         ForeColor       =   &H80000008& 
         Height          =   345 
         Left            =   10725 
         MouseIcon       =   "FrmKaoShi.frx":CD66 
         MousePointer    =   99  'Custom 
         TabIndex        =   26 
         Top             =   4785 
         Width           =   975 
      End 
      Begin VB.Label Label2  
         AutoSize        =   -1  'True 
         BackStyle       =   0  'Transparent 
         Caption         =   "解答:" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   12 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         ForeColor       =   &H000000C0& 
         Height          =   240 
         Left            =   3105 
         TabIndex        =   21 
         Top             =   3735 
         Width           =   600 
      End 
   End 
   Begin VB.PictureBox PicZW  
      BorderStyle     =   0  'None 
      Height          =   7455 
      Left            =   1815 
      ScaleHeight     =   7455 
      ScaleWidth      =   12015 
      TabIndex        =   9 
      Top             =   15 
      Visible         =   0   'False 
      Width           =   12015 
      Begin RichTextLib.RichTextBox RtbZWTM  
         Height          =   4620 
         Left            =   120 
         TabIndex        =   13 
         Top             =   2655 
         Width           =   3015 
         _ExtentX        =   5318 
         _ExtentY        =   8149 
         _Version        =   393217 
         BackColor       =   16757944 
         ReadOnly        =   -1  'True 
         ScrollBars      =   3 
         Appearance      =   0 
         TextRTF         =   $"FrmKaoShi.frx":D1A8 
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
      End 
      Begin VB.ListBox LstZW  
         Appearance      =   0  'Flat 
         BackColor       =   &H00FFB4B8& 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   12 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   1230 
         Left            =   120 
         TabIndex        =   11 
         Top             =   1230 
         Width           =   3015 
      End 
      Begin RichTextLib.RichTextBox RtbZW  
         Height          =   5850 
         Left            =   3210 
         TabIndex        =   10 
         Top             =   915 
         Width           =   8025 
         _ExtentX        =   14155 
         _ExtentY        =   10319 
         _Version        =   393217 
         BackColor       =   15267064 
         ScrollBars      =   2 
         Appearance      =   0 
         TextRTF         =   $"FrmKaoShi.frx":D432 
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
      End 
      Begin VB.Label LabZWSave  
         Alignment       =   2  'Center 
         Appearance      =   0  'Flat 
         BackColor       =   &H0080C0FF& 
         BorderStyle     =   1  'Fixed Single 
         Caption         =   "保存" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   14.25 
            Charset         =   134 
            Weight          =   700 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         ForeColor       =   &H80000008& 
         Height          =   345 
         Left            =   9180 
         MouseIcon       =   "FrmKaoShi.frx":D6BC 
         MousePointer    =   99  'Custom 
         TabIndex        =   27 
         Top             =   6795 
         Width           =   975 
      End 
      Begin VB.Label Label1  
         AutoSize        =   -1  'True 
         BackStyle       =   0  'Transparent 
         Caption         =   "作文题目" 
         BeginProperty Font  
            Name            =   "楷体_GB2312" 
            Size            =   14.25 
            Charset         =   134 
            Weight          =   700 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         ForeColor       =   &H000000C0& 
         Height          =   285 
         Left            =   240 
         TabIndex        =   12 
         Top             =   870 
         Width           =   1275 
      End 
   End 
   Begin VB.PictureBox PicTK  
      BorderStyle     =   0  'None 
      Height          =   7455 
      Left            =   3075 
      ScaleHeight     =   7455 
      ScaleWidth      =   12015 
      TabIndex        =   3 
      Top             =   -135 
      Visible         =   0   'False 
      Width           =   12015 
      Begin VB.PictureBox PicParent  
         Appearance      =   0  'Flat 
         BackColor       =   &H80000003& 
         ForeColor       =   &H80000008& 
         Height          =   2940 
         Left            =   3540 
         ScaleHeight     =   2910 
         ScaleWidth      =   6435 
         TabIndex        =   16 
         Top             =   4065 
         Width           =   6465 
         Begin VB.PictureBox PicDA  
            Appearance      =   0  'Flat 
            BackColor       =   &H00FFB4B8& 
            ForeColor       =   &H80000008& 
            Height          =   2910 
            Left            =   0 
            ScaleHeight     =   2880 
            ScaleWidth      =   6405 
            TabIndex        =   17 
            Top             =   0 
            Width           =   6435 
            Begin VB.TextBox TxTDaan  
               Appearance      =   0  'Flat 
               BeginProperty Font  
                  Name            =   "宋体" 
                  Size            =   10.5 
                  Charset         =   134 
                  Weight          =   400 
                  Underline       =   0   'False 
                  Italic          =   0   'False 
                  Strikethrough   =   0   'False 
               EndProperty 
               Height          =   315 
               Index           =   0 
               Left            =   795 
               TabIndex        =   18 
               Top             =   105 
               Visible         =   0   'False 
               Width           =   2730 
            End 
            Begin VB.Label LabDaan  
               AutoSize        =   -1  'True 
               BackStyle       =   0  'Transparent 
               Caption         =   "1、" 
               BeginProperty Font  
                  Name            =   "宋体" 
                  Size            =   12 
                  Charset         =   134 
                  Weight          =   400 
                  Underline       =   0   'False 
                  Italic          =   0   'False 
                  Strikethrough   =   0   'False 
               EndProperty 
               Height          =   240 
               Index           =   0 
               Left            =   450 
               TabIndex        =   19 
               Top             =   150 
               Visible         =   0   'False 
               Width           =   270 
            End 
         End 
      End 
      Begin VB.VScrollBar VSDA  
         Height          =   2940 
         LargeChange     =   200 
         Left            =   10035 
         SmallChange     =   200 
         TabIndex        =   15 
         Top             =   4065 
         Width           =   165 
      End 
      Begin VB.ListBox LstTK  
         Appearance      =   0  'Flat 
         BackColor       =   &H00E8F4F8& 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   12 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   5790 
         Left            =   1140 
         TabIndex        =   14 
         Top             =   900 
         Width           =   1740 
      End 
      Begin RichTextLib.RichTextBox RtbTK  
         Height          =   2610 
         Left            =   3240 
         TabIndex        =   4 
         Top             =   915 
         Width           =   7260 
         _ExtentX        =   12806 
         _ExtentY        =   4604 
         _Version        =   393217 
         ReadOnly        =   -1  'True 
         ScrollBars      =   2 
         Appearance      =   0 
         TextRTF         =   $"FrmKaoShi.frx":DAFE 
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
      End 
      Begin VB.Label Label5  
         AutoSize        =   -1  'True 
         BackStyle       =   0  'Transparent 
         Caption         =   "填空:" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   12 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         ForeColor       =   &H000000C0& 
         Height          =   240 
         Left            =   3330 
         TabIndex        =   33 
         Top             =   3705 
         Width           =   600 
      End 
   End 
   Begin VB.PictureBox PicPD  
      BorderStyle     =   0  'None 
      Height          =   7455 
      Left            =   3045 
      ScaleHeight     =   7455 
      ScaleWidth      =   12015 
      TabIndex        =   5 
      Top             =   15 
      Visible         =   0   'False 
      Width           =   12015 
      Begin VB.OptionButton OptCuo  
         Appearance      =   0  'Flat 
         BackColor       =   &H00E8F4F8& 
         Caption         =   "错" 
         ForeColor       =   &H00FF0000& 
         Height          =   210 
         Left            =   7350 
         TabIndex        =   34 
         Top             =   5025 
         Width           =   435 
      End 
      Begin VB.OptionButton OptDui  
         Appearance      =   0  'Flat 
         BackColor       =   &H00E8F4F8& 
         Caption         =   "对" 
         ForeColor       =   &H00FF0000& 
         Height          =   210 
         Left            =   6810 
         TabIndex        =   24 
         Top             =   5040 
         Width           =   435 
      End 
      Begin VB.OptionButton OptMei  
         Appearance      =   0  'Flat 
         BackColor       =   &H00E8F4F8& 
         Caption         =   "未答" 
         ForeColor       =   &H00FF0000& 
         Height          =   210 
         Left            =   6000 
         TabIndex        =   23 
         Top             =   5025 
         Value           =   -1  'True 
         Width           =   690 
      End 
      Begin VB.ListBox LstPD  
         Appearance      =   0  'Flat 
         BackColor       =   &H00E8F4F8& 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   12 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   5790 
         Left            =   1140 
         TabIndex        =   22 
         Top             =   915 
         Width           =   1740 
      End 
      Begin RichTextLib.RichTextBox RtbPD  
         Height          =   3585 
         Left            =   3210 
         TabIndex        =   6 
         Top             =   915 
         Width           =   6495 
         _ExtentX        =   11456 
         _ExtentY        =   6324 
         _Version        =   393217 
         ReadOnly        =   -1  'True 
         ScrollBars      =   2 
         Appearance      =   0 
         TextRTF         =   $"FrmKaoShi.frx":DD88 
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
      End 
      Begin VB.Line Line1  
         BorderWidth     =   2 
         X1              =   6750 
         X2              =   6750 
         Y1              =   4995 
         Y2              =   5265 
      End 
      Begin VB.Label Label3  
         AutoSize        =   -1  'True 
         BackStyle       =   0  'Transparent 
         Caption         =   "答案:" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         ForeColor       =   &H000000C0& 
         Height          =   210 
         Left            =   5415 
         TabIndex        =   25 
         Top             =   5010 
         Width           =   525 
      End 
      Begin VB.Line Line2  
         BorderWidth     =   2 
         X1              =   7305 
         X2              =   7305 
         Y1              =   4995 
         Y2              =   5265 
      End 
      Begin VB.Shape Shape2  
         BackColor       =   &H00E8F4F8& 
         FillColor       =   &H00FFFFFF& 
         FillStyle       =   0  'Solid 
         Height          =   315 
         Left            =   5940 
         Top             =   4965 
         Width           =   1950 
      End 
   End 
   Begin VB.Image ImgXZ  
      Height          =   960 
      Left            =   510 
      MouseIcon       =   "FrmKaoShi.frx":E012 
      MousePointer    =   99  'Custom 
      Picture         =   "FrmKaoShi.frx":E454 
      Top             =   7740 
      Width           =   1305 
   End 
   Begin VB.Image ImgTK  
      Height          =   960 
      Left            =   2055 
      MouseIcon       =   "FrmKaoShi.frx":109A7 
      MousePointer    =   99  'Custom 
      Picture         =   "FrmKaoShi.frx":10DE9 
      Top             =   7740 
      Width           =   1305 
   End 
   Begin VB.Image ImgPD  
      Height          =   960 
      Left            =   3675 
      MouseIcon       =   "FrmKaoShi.frx":13353 
      MousePointer    =   99  'Custom 
      Picture         =   "FrmKaoShi.frx":13795 
      Top             =   7740 
      Width           =   1305 
   End 
   Begin VB.Image ImgWD  
      Height          =   960 
      Left            =   5295 
      MouseIcon       =   "FrmKaoShi.frx":15CBE 
      MousePointer    =   99  'Custom 
      Picture         =   "FrmKaoShi.frx":16100 
      Top             =   7740 
      Width           =   1305 
   End 
   Begin VB.Image ImgZW  
      Height          =   960 
      Left            =   6915 
      MouseIcon       =   "FrmKaoShi.frx":1860A 
      MousePointer    =   99  'Custom 
      Picture         =   "FrmKaoShi.frx":18A4C 
      Top             =   7740 
      Width           =   1305 
   End 
   Begin VB.Image imgSubmit  
      Height          =   960 
      Left            =   10425 
      MouseIcon       =   "FrmKaoShi.frx":1AED4 
      MousePointer    =   99  'Custom 
      Picture         =   "FrmKaoShi.frx":1B316 
      Top             =   7800 
      Width           =   1305 
   End 
End 
Attribute VB_Name = "FrmKaoShi" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Option Explicit 
'保存时从1开始算,0号为空 
Dim TKIDArr() As Long '填空题id数组 
Dim PDIDArr() As Long '判断题id数组 
Dim WDIDArr() As Long '问答题id数组 
Dim ZWIDArr() As Long '作文题id数组 
Dim OldDAan As String '保存旧一次的答案 
Dim NewWho As Integer '表示现在操作那个题型 
'由ID值求他的对应题目的分数 
Function GetScoreByID(ScoreArr() As String, ByVal ID As Long) As String 
    Dim i As Long 
    Dim strArr() As String 
    For i = 0 To UBound(ScoreArr) 
      strArr = Split(ScoreArr(i), ",") 
      If strArr(0) = Int2Str(ID) Then 
        GetScoreByID = strArr(1) 
        Exit Function 
      End If 
    Next i 
    GetScoreByID = "" 
End Function 
 '生成本机数据 
Function CreateTest() As Boolean 
  Dim adoRS As Recordset 
  Set adoRS = New Recordset 
  adoRS.CursorLocation = adUseClient 
 
  adoRS.Open "kaoshixinxi", ConnString, adOpenStatic, adLockOptimistic 
   '读题目 
  '判断是否发卷 
  If adoRS.EOF Then 
     CreateTest = False 
     Exit Function 
   Else 
    '创建本地试卷信息 
     
     Dim LocaladoRs As Recordset 
     Set LocaladoRs = New Recordset 
     LocaladoRs.CursorLocation = adUseClient 
 
     LocaladoRs.Open "试卷信息", LocalConn, adOpenStatic, adLockOptimistic 
      
     LocaladoRs.AddNew 
     LocaladoRs.Fields("试卷标题").Value = adoRS.Fields("title").Value 
     LabTitle.Caption = adoRS.Fields("title").Value 
     LocaladoRs.Fields("考试日期").Value = Date '当天 
     LocaladoRs.Fields("试卷编号").Value = adoRS.Fields("id").Value 
     LocaladoRs.Fields("试卷总分").Value = adoRS.Fields("zscore").Value 
     LabScore.Caption = "总分:" & adoRS.Fields("zscore").Value & "分" 
     'LocaladoRs.Fields("科目ID").Value = adoRS.Fields("kemuid").Value 
     'LocaladoRs.Fields("年级ID").Value = adoRS.Fields("nianjiid").Value 
     LocaladoRs.Update 
     Set LocaladoRs = Nothing 
     '保存题目id数组 
     Dim TempIDArr() As String 
     '保存题目分数数组 
     Dim TempScoreArr() As String 
     Dim Pcount As Integer '题目的个数 
     'Dim TLong As Long 
     Dim i As Integer 
     Dim ScoreArr() As String  '保存分数和题目对应的数组 
     Dim sql As String 
     '定义保存试卷题目的记录集 
     Dim adoSJRs As Recordset 
     Set adoSJRs = New Recordset 
     adoSJRs.CursorLocation = adUseClient 
 
      
     '生成单选题 
     '========判断是否有单选题 
     If adoRS.Fields("danxuan").Value <> "" Then 
      
       TempIDArr = Split(adoRS.Fields("danxuan").Value, ",") 
       TempScoreArr = Split(adoRS.Fields("danxuans").Value, ",") 
       Pcount = UBound(TempIDArr) 
       ReDim ScoreArr(Pcount + 1) 
       For i = 0 To Pcount 
          ScoreArr(i) = TempIDArr(i) + "," + TempScoreArr(i) 
       Next i 
       sql = "select id,wenti,xuanze1,xuanze2,xuanze3,xuanze4,daan from question where id in (" + adoRS.Fields("danxuan").Value + ")" 
       adoSJRs.Open sql, ConnString, adOpenStatic, adLockOptimistic 
       '插入本地数据库 
       Do While Not adoSJRs.EOF 
        '创建本地试卷 
        sql = "insert into 试卷选择题(ID,问题,A,B,C,D,答案,分数,考生答案,类别) values(" + Str(adoSJRs.Fields("id").Value) + ",'" 
        sql = sql + adoSJRs.Fields("wenti").Value + "','" + adoSJRs.Fields("xuanze1").Value + "','" + adoSJRs.Fields("xuanze2").Value + "','" 
        sql = sql + adoSJRs.Fields("xuanze3").Value + "','" + adoSJRs.Fields("xuanze4").Value + "','" + adoSJRs.Fields("daan").Value + "'," + GetScoreByID(ScoreArr, adoSJRs.Fields("id").Value) + ",'','" 
        sql = sql + "单')" 
        LocalConn.Execute sql 
        adoSJRs.MoveNext 
       Loop 
     
     
       '关闭adosjrs对象 
       adoSJRs.Close 
      
     End If 
      
      
    '生成多选题 
     If adoRS.Fields("duoxuan").Value <> "" Then 
      
     TempIDArr = Split(adoRS.Fields("duoxuan").Value, ",") 
       TempScoreArr = Split(adoRS.Fields("duoxuans").Value, ",") 
       Pcount = UBound(TempIDArr) 
       ReDim ScoreArr(Pcount + 1) 
       For i = 0 To Pcount 
          ScoreArr(i) = TempIDArr(i) + "," + TempScoreArr(i) 
       Next i 
       sql = "select id,wenti,xuanze1,xuanze2,xuanze3,xuanze4,daan from question where id in (" + adoRS.Fields("duoxuan").Value + ")" 
       adoSJRs.Open sql, ConnString, adOpenStatic, adLockOptimistic 
       '插入本地数据库 
       Do While Not adoSJRs.EOF 
        '创建本地试卷 
        sql = "insert into 试卷选择题(ID,问题,A,B,C,D,答案,分数,考生答案,类别) values(" + Str(adoSJRs.Fields("id").Value) + ",'" 
        sql = sql + adoSJRs.Fields("wenti").Value + "','" + adoSJRs.Fields("xuanze1").Value + "','" + adoSJRs.Fields("xuanze2").Value + "','" 
        sql = sql + adoSJRs.Fields("xuanze3").Value + "','" + adoSJRs.Fields("xuanze4").Value + "','" + adoSJRs.Fields("daan").Value + "'," + GetScoreByID(ScoreArr, adoSJRs.Fields("id").Value) + ",'','" 
        sql = sql + "多')" 
        LocalConn.Execute sql 
        adoSJRs.MoveNext 
       Loop 
       '关闭adosjrs对象 
       adoSJRs.Close 
    End If 
     
    '生成填空题 
     If adoRS.Fields("tiankong").Value <> "" Then 
      
       TempIDArr = Split(adoRS.Fields("tiankong").Value, ",") 
       TempScoreArr = Split(adoRS.Fields("tiankongs").Value, ",") 
       Pcount = UBound(TempIDArr) 
       ReDim ScoreArr(Pcount + 1) 
       For i = 0 To Pcount 
          ScoreArr(i) = TempIDArr(i) + "," + TempScoreArr(i) 
       Next i 
       sql = "select id,wenti,Kcount from questionTK where id in (" + adoRS.Fields("tiankong").Value + ")" 
       adoSJRs.Open sql, ConnString, adOpenStatic, adLockOptimistic 
       '插入本地数据库 
       Do While Not adoSJRs.EOF 
        '创建本地试卷 
        sql = "insert into 试卷填空题(ID,问题,空数,分数,考生答案) values(" + Str(adoSJRs.Fields("id").Value) + ",'" 
        sql = sql + adoSJRs.Fields("wenti").Value + "'," & adoSJRs.Fields("Kcount").Value & "," 
        sql = sql + GetScoreByID(ScoreArr, adoSJRs.Fields("id").Value) + ",'')" 
        LocalConn.Execute sql 
        adoSJRs.MoveNext 
       Loop 
       '关闭adosjrs对象 
       adoSJRs.Close 
    End If 
     
    '生成判断题 
     If adoRS.Fields("panduan").Value <> "" Then 
      
       TempIDArr = Split(adoRS.Fields("panduan").Value, ",") 
       TempScoreArr = Split(adoRS.Fields("panduans").Value, ",") 
       Pcount = UBound(TempIDArr) 
       ReDim ScoreArr(Pcount + 1) 
       For i = 0 To Pcount 
          ScoreArr(i) = TempIDArr(i) + "," + TempScoreArr(i) 
       Next i 
       sql = "select id,wenti,daan from questionPD where id in (" + adoRS.Fields("panduan").Value + ")" 
       adoSJRs.Open sql, ConnString, adOpenStatic, adLockOptimistic 
       '插入本地数据库 
       Do While Not adoSJRs.EOF 
        '创建本地试卷 
        sql = "insert into 试卷判断题(ID,问题,答案,分数,考生答案) values(" + Str(adoSJRs.Fields("id").Value) + ",'" 
        sql = sql + adoSJRs.Fields("wenti").Value + "','" & adoSJRs.Fields("daan").Value & "'," 
        sql = sql + GetScoreByID(ScoreArr, adoSJRs.Fields("id").Value) + ",'')" 
        LocalConn.Execute sql 
        adoSJRs.MoveNext 
       Loop 
       '关闭adosjrs对象 
       adoSJRs.Close 
    End If 
     
    '生成问答题 
     If adoRS.Fields("wenda").Value <> "" Then 
      
       TempIDArr = Split(adoRS.Fields("wenda").Value, ",") 
       TempScoreArr = Split(adoRS.Fields("wendas").Value, ",") 
       Pcount = UBound(TempIDArr) 
       ReDim ScoreArr(Pcount + 1) 
       For i = 0 To Pcount 
          ScoreArr(i) = TempIDArr(i) + "," + TempScoreArr(i) 
       Next i 
       sql = "select id,wenti from questionWD where id in (" + adoRS.Fields("wenda").Value + ")" 
       adoSJRs.Open sql, ConnString, adOpenStatic, adLockOptimistic 
       '插入本地数据库 
       Do While Not adoSJRs.EOF 
        '创建本地试卷 
        sql = "insert into 试卷问答题(ID,问题,分数,考生答案) values(" + Str(adoSJRs.Fields("id").Value) + ",'" 
        sql = sql + adoSJRs.Fields("wenti").Value + "'," 
        sql = sql + GetScoreByID(ScoreArr, adoSJRs.Fields("id").Value) + ",'')" 
        LocalConn.Execute sql 
        adoSJRs.MoveNext 
       Loop 
       '关闭adosjrs对象 
       adoSJRs.Close 
    End If 
     
     '生成作文题 
     If adoRS.Fields("zuowen").Value <> "" Then 
      
       TempIDArr = Split(adoRS.Fields("zuowen").Value, ",") 
       TempScoreArr = Split(adoRS.Fields("zuowens").Value, ",") 
       Pcount = UBound(TempIDArr) 
       ReDim ScoreArr(Pcount + 1) 
       For i = 0 To Pcount 
          ScoreArr(i) = TempIDArr(i) + "," + TempScoreArr(i) 
       Next i 
       sql = "select id,wenti from questionZW where id in (" + adoRS.Fields("zuowen").Value + ")" 
       adoSJRs.Open sql, ConnString, adOpenStatic, adLockOptimistic 
       '插入本地数据库 
       Do While Not adoSJRs.EOF 
        '创建本地试卷 
        sql = "insert into 试卷作文题(ID,问题,分数,考生答案) values(" + Str(adoSJRs.Fields("id").Value) + ",'" 
        sql = sql + adoSJRs.Fields("wenti").Value + "'," 
        sql = sql + GetScoreByID(ScoreArr, adoSJRs.Fields("id").Value) + ",'')" 
        LocalConn.Execute sql 
        adoSJRs.MoveNext 
       Loop 
       '关闭adosjrs对象 
       adoSJRs.Close 
    End If 
     
    '悉放对象 
    Set adoRS = Nothing 
    Set adoSJRs = Nothing 
     
     
  End If 
      
End Function 
 
 
 
 
 
 
Private Sub Command5_Click() 
End Sub 
 
Private Sub Command6_Click() 
 
End Sub 
 
Private Sub Form_Load() 
'判断是否发试卷 
'判断是否已经生成本地数据库 
Dim adoRS As Recordset 
Set adoRS = New Recordset 
adoRS.CursorLocation = adUseClient 
 
adoRS.Open "试卷信息", LocalConn, adOpenStatic, adLockOptimistic 
If adoRS.EOF Then 
   CreateTest '生成试卷 
  Else 
   LabTitle.Caption = adoRS.Fields("试卷标题").Value 
   LabScore.Caption = "总分:" & adoRS.Fields("试卷总分").Value & "分" 
End If 
 '创建选择题的树 
 CreateTree 
  
'显示填空题显示 
adoRS.Close 
adoRS.Open "select ID from 试卷填空题", LocalConn, adOpenStatic, adLockOptimistic 
LstTK.Clear 
If Not adoRS.EOF Then 
  adoRS.MoveLast 
  adoRS.MoveFirst 
  '重定义 
  ReDim TKIDArr(adoRS.RecordCount + 1) As Long 
  Do While Not adoRS.EOF 
     LstTK.AddItem "第" & adoRS.AbsolutePosition & "题" 
     TKIDArr(adoRS.AbsolutePosition) = adoRS.Fields("ID").Value 
     adoRS.MoveNext 
  Loop 
End If 
 
'显示判断题显示 
adoRS.Close 
adoRS.Open "select ID from 试卷判断题", LocalConn, adOpenStatic, adLockOptimistic 
LstPD.Clear 
If Not adoRS.EOF Then 
  adoRS.MoveLast 
  adoRS.MoveFirst 
  '重定义 
  ReDim PDIDArr(adoRS.RecordCount + 1) As Long 
  Do While Not adoRS.EOF 
     LstPD.AddItem "第" & adoRS.AbsolutePosition & "题" 
     PDIDArr(adoRS.AbsolutePosition) = adoRS.Fields("ID").Value 
     adoRS.MoveNext 
  Loop 
End If 
 
'显示问答题显示 
adoRS.Close 
adoRS.Open "select ID from 试卷问答题", LocalConn, adOpenStatic, adLockOptimistic 
LstWD.Clear 
If Not adoRS.EOF Then 
  adoRS.MoveLast 
  adoRS.MoveFirst 
  '重定义 
  ReDim WDIDArr(adoRS.RecordCount + 1) As Long 
  Do While Not adoRS.EOF 
     LstWD.AddItem "第" & adoRS.AbsolutePosition & "题" 
     WDIDArr(adoRS.AbsolutePosition) = adoRS.Fields("ID").Value 
     adoRS.MoveNext 
  Loop 
End If 
 
'显示作文题显示 
adoRS.Close 
adoRS.Open "select ID from 试卷作文题", LocalConn, adOpenStatic, adLockOptimistic 
LstZW.Clear 
If Not adoRS.EOF Then 
  adoRS.MoveLast 
  adoRS.MoveFirst 
  '重定义 
  ReDim ZWIDArr(adoRS.RecordCount + 1) As Long 
  Do While Not adoRS.EOF 
     LstZW.AddItem "第" & adoRS.AbsolutePosition & "题" 
     ZWIDArr(adoRS.AbsolutePosition) = adoRS.Fields("ID").Value 
     adoRS.MoveNext 
  Loop 
End If 
'显示背景图片 
PicXZ.Picture = Me.Picture 
PicTK.Picture = Me.Picture 
PicPD.Picture = Me.Picture 
PicWD.Picture = Me.Picture 
PicZW.Picture = Me.Picture 
'产生填空框 
CreateDA 
'初始化 
NewWho = 1 
End Sub 
 
'生成题目树 
Sub CreateTree() 
   
  Dim adoRS As Recordset 
  Dim i As Integer 
  Dim MyNod As Node 
  Dim NewNod As Node 
 '显示试卷题目信息 
 '打开记录集 
  Set adoRS = New Recordset 
  adoRS.CursorLocation = adUseClient 
 
  adoRS.Open "select ID from 试卷选择题 where 类别='单'", LocalConn, adOpenStatic, adLockOptimistic 
    
  '========= 
  '判断是否有单选  '=================== 
  If adoRS.RecordCount <> 0 Then 
     '=========建立单项选择根接点 
  Set MyNod = TrVTM.Nodes.Add(, , "node_dan", "单项选择题", 1) 
  Do While Not adoRS.EOF 
    '建立单项题节点 
    Set NewNod = TrVTM.Nodes.Add("node_dan", tvwChild, "node_dan|" + Trim(Str(adoRS.Fields("ID").Value)), "第" + Trim(Str(adoRS.AbsolutePosition)) + "题", 2) 
    adoRS.MoveNext 
  Loop 
  End If 
  adoRS.Close 
  
   '=========建立多选 
  adoRS.Open "select ID from 试卷选择题 where 类别='多'", LocalConn, adOpenStatic, adLockOptimistic 
  If adoRS.RecordCount <> 0 Then 
   '建立多项选择根接点 
  Set MyNod = TrVTM.Nodes.Add(, , "node_duo", "多项选择题", 1) 
  Do While Not adoRS.EOF 
    '建立多项题节点 
    Set NewNod = TrVTM.Nodes.Add("node_duo", tvwChild, "node_duo|" + Trim(Str(adoRS.Fields("ID").Value)), "第" + Trim(Str(adoRS.AbsolutePosition)) + "题", 2) 
    adoRS.MoveNext 
  Loop 
  Set adoRS = Nothing 
  End If 
End Sub 
 
'设置现在做的是那个题型,显示那个图片框 
Sub SetPicVisible(ByVal Who As Integer) 
  'who表示的是现在编辑的题型的序号 
NewWho = Who 
Select Case Who 
   Case 1 
      PicTK.Visible = False 
      PicPD.Visible = False 
      PicWD.Visible = False 
      PicZW.Visible = False 
      PicXZ.Visible = True 
   Case 2 
     PicXZ.Visible = False 
      PicPD.Visible = False 
      PicWD.Visible = False 
      PicZW.Visible = False 
     PicTK.Visible = True 
   Case 3 
     PicXZ.Visible = False 
      PicTK.Visible = False 
      PicWD.Visible = False 
      PicZW.Visible = False 
     PicPD.Visible = True 
   Case 4 
     PicXZ.Visible = False 
      PicTK.Visible = False 
      PicPD.Visible = False 
      PicZW.Visible = False 
     PicWD.Visible = True 
   Case 5 
     PicXZ.Visible = False 
      PicTK.Visible = False 
      PicPD.Visible = False 
      PicWD.Visible = False 
     PicZW.Visible = True 
 End Select 
End Sub 
'保存答案 
Sub SaveAll() 
  Select Case NewWho 
    Case 1 
     SaveDaAN 
    Case 2 
     SaveTK 
    Case 3 
     SavePD 
    Case 4 
     SaveWD 
    Case 5 
     SaveZW 
  End Select 
End Sub 
Private Sub Form_Resize() 
    '设置各组和框的位置 
  PicTK.Top = PicXZ.Top 
  PicTK.Left = PicXZ.Left 
  PicPD.Top = PicXZ.Top 
  PicPD.Left = PicXZ.Left 
  PicWD.Top = PicXZ.Top 
  PicWD.Left = PicXZ.Left 
  PicZW.Top = PicXZ.Top 
  PicZW.Left = PicXZ.Left 
 
End Sub 
 
 
Private Sub ImgPD_Click() 
  SaveAll '保存答案 
   SetPicVisible 3 
End Sub 
 
Private Sub imgSubmit_Click() 
       '交卷 
 Dim answer As String 
 SaveDaAN 
 MsgBox "请检查你所做的题目有没有漏和错!你一旦交了卷就不能更改了!" 
 answer = MsgBox("你确定真的要交卷吗?请慎重考虑!!!!", vbExclamation + vbYesNo, "确定") 
 If answer = vbYes Then 
   If JiaoJuan = True Then '处理交卷 
      DelDB 
      MsgBox "你已经成功的交了卷!" 
      Unload Me 
    Else 
      MsgBox "交卷失败,请重试或者报告老师!" 
   End If 
 End If 
 
End Sub 
 
Private Sub ImgTK_Click() 
    SaveAll '保存答案 
  SetPicVisible 2 
End Sub 
 
Private Sub ImgWD_Click() 
      SaveAll '保存答案 
    SetPicVisible 4 
End Sub 
 
Private Sub ImgXZ_Click() 
     SaveAll '保存答案 
   SetPicVisible 1 
 
End Sub 
 
Private Sub ImgZW_Click() 
     SaveAll '保存答案 
    SetPicVisible 5 
End Sub 
 
Private Sub LabWDSave_Click() 
 If LstWD.Tag = "" Then 
    MsgBox "请选择要保存的题目!" 
    Exit Sub 
 End If 
 '保存问答题 
 SaveWD 
 MsgBox "答案已经保存成功!" 
End Sub 
 
Private Sub LabZWSave_Click() 
 If LstZW.Tag = "" Then 
   MsgBox "请选择保存的题目!" 
   Exit Sub 
 End If 
 SaveZW 
 MsgBox "作文已经成功的保存!" 
End Sub 
 
Private Sub LstPD_Click() 
  Dim NewDAan As String 
  If OptMei.Value = True Then 
     NewDAan = "" 
    ElseIf OptDui.Value = True Then 
     NewDAan = "T" 
    Else 
     NewDAan = "F" 
  End If 
  If NewDAan <> OldDAan Then 
    SavePD 
  End If 
  ViewPD PDIDArr(LstPD.ListIndex + 1) 
  If OptMei.Value = True Then 
     OldDAan = "" 
    ElseIf OptDui.Value = True Then 
     OldDAan = "T" 
    Else 
     OldDAan = "F" 
  End If 
  LstPD.Tag = PDIDArr(LstPD.ListIndex + 1) 
End Sub 
 
Private Sub LstTK_Click() 
'判断是否改变 
  Dim NewDAan As String 
  Dim i As Integer 
  If RtbTK.Tag <> "" Then 
    For i = 1 To Val(RtbTK.Tag) 
      NewDAan = NewDAan + TxTDaan(i).Text 
    Next i 
    If OldDAan <> NewDAan Then 
      SaveTK 
    End If 
  End If 
  ViewTK TKIDArr(LstTK.ListIndex + 1) 
  OldDAan = "" 
  For i = 1 To Val(RtbTK.Tag) 
      OldDAan = OldDAan + TxTDaan(i).Text 
  Next i 
  LstTK.Tag = TKIDArr(LstTK.ListIndex + 1) 
End Sub 
 
Private Sub LstWD_Click() 
 If OldDAan <> RtbWDDA.Text Then 
    SaveWD 
 End If 
 ViewWD WDIDArr(LstWD.ListIndex + 1) 
 OldDAan = RtbWDDA.Text 
 LstWD.Tag = WDIDArr(LstWD.ListIndex + 1) 
End Sub 
 
Private Sub LstZW_Click() 
  If OldDAan <> RtbZW.Text Then 
    SaveZW 
  End If 
  ViewZW ZWIDArr(LstZW.ListIndex + 1) 
  OldDAan = RtbZW.Text 
  LstZW.Tag = ZWIDArr(LstZW.ListIndex + 1) 
End Sub 
 
Private Sub RtbWDDA_KeyPress(KeyAscii As Integer) 
   If KeyAscii = 39 Then KeyAscii = -24145 
 
End Sub 
 
Private Sub RtbZW_KeyPress(KeyAscii As Integer) 
    If KeyAscii = 39 Then KeyAscii = -24145 
 
End Sub 
 
Private Sub TrVTM_NodeClick(ByVal Node As MSComctlLib.Node) 
   Dim Pid As Long 
    
   If Node.Children = 0 Then 
       
       '判断答案是否改变,改变则保存 
       Dim i As Integer 
       Dim NewDAan As String 
       For i = 0 To 3 
       If Check1(i).Value Then 
          NewDAan = NewDAan & Check1(i).Caption & "," 
       End If 
       Next i 
       '改变则保存 
       If OldDAan <> NewDAan And TXTView.Tag <> "" Then 
          SaveDaAN 
       End If 
       '显示 
        
       Pid = Val(Right(Node.Key, Len(Node.Key) - 9)) 
       '查询显示 
       Dim adoTMRs As Recordset 
       Dim sql As String 
       Set adoTMRs = New Recordset 
       adoTMRs.CursorLocation = adUseClient 
 
       sql = "select * from 试卷选择题 where ID=" + Str(Pid) 
       adoTMRs.Open sql, LocalConn, adOpenStatic, adLockOptimistic 
       ViewTM adoTMRs 
       '保存作为上一次的答案,判断答案是否改变,改变则保存 
       OldDAan = "" 
       For i = 0 To 3 
       If Check1(i).Value Then 
          OldDAan = OldDAan & Check1(i).Caption & "," 
       End If 
       Next i 
               
       '在控件里保存所选的题目ID 
       TXTView.Tag = Pid 
        
       '关闭记录集 
       Set adoTMRs = Nothing 
        
       
     'PopupMenu M_Add 
   End If 
End Sub 
'产生填空框 
Sub CreateDA() 
  Dim i As Integer 
  For i = 1 To 30 
    If (i Mod 2) = 0 Then 
       Load LabDaan(i) 
       LabDaan(i).Caption = i & "、" 
       LabDaan(i).Left = 3190 
       'LabDaan(i).Visible = True 
       Load TxTDaan(i) 
       TxTDaan(i).Left = 3525 
       'TxTDaan(i).Visible = True 
    Else 
       Load LabDaan(i) 
       LabDaan(i).Caption = i & "、" 
       LabDaan(i).Left = 100 
       'LabDaan(i).Visible = True 
       Load TxTDaan(i) 
       TxTDaan(i).Left = 435 
       'TxTDaan(i).Visible = True 
     
     End If 
     TxTDaan(i).Top = (Round((i / 2) + 0.1) - 1) * 315 + Round((i / 2) + 0.2) * 100 
     LabDaan(i).Top = TxTDaan(i).Top 
  Next i 
  PicDA.Height = TxTDaan(30).Top + 315 + 100 
  VSDA.Max = PicDA.Height - PicParent.Height 
  VSDA.Min = 0 
End Sub 
 
Private Sub TxTDaan_KeyPress(Index As Integer, KeyAscii As Integer) 
    If KeyAscii = 39 Then KeyAscii = -24145 
 
End Sub 
 
Private Sub VSDA_Change() 
  PicDA.Top = -1 * VSDA.Value 
End Sub 
'预览判断题 
Sub ViewPD(ByVal TMid As Long) '题目id 
  Dim adoRS As Recordset 
  Set adoRS = New Recordset 
  adoRS.CursorLocation = adUseClient 
 
  Dim DaanArr() As String 
  adoRS.Open "select * from 试卷判断题 where ID=" & TMid, LocalConn, adOpenStatic, adLockOptimistic 
  If Not adoRS.EOF Then 
     '显示 
     RtbPD.Text = "   " + adoRS.Fields("问题").Value + "(" & adoRS.Fields("分数").Value & ")" + vbCrLf 
     '显示答案 
     If Len(adoRS.Fields("考生答案").Value) <= 0 Then 
        OptMei.Value = True 
      ElseIf adoRS.Fields("考生答案").Value = "T" Then 
        OptDui.Value = True 
       Else 
        OptCuo.Value = True 
     End If 
  End If 
 
End Sub 
'预览作文题 
Sub ViewZW(ByVal TMid As Long) '题目id 
    Dim adoRS As Recordset 
  Set adoRS = New Recordset 
  adoRS.CursorLocation = adUseClient 
 
  Dim DaanArr() As String 
  adoRS.Open "select * from 试卷作文题 where ID=" & TMid, LocalConn, adOpenStatic, adLockOptimistic 
  If Not adoRS.EOF Then 
     '显示 
     RtbZWTM.Text = "   " + adoRS.Fields("问题").Value + "(" & adoRS.Fields("分数").Value & ")" + vbCrLf 
     '显示答案 
     RtbZW.Text = adoRS.Fields("考生答案").Value 
  End If 
 Set adoRS = Nothing 
End Sub 
'预览问答题 
Sub ViewWD(ByVal TMid As Long) '题目id 
  Dim adoRS As Recordset 
  Set adoRS = New Recordset 
  adoRS.CursorLocation = adUseClient 
 
  Dim DaanArr() As String 
  adoRS.Open "select * from 试卷问答题 where ID=" & TMid, LocalConn, adOpenStatic, adLockOptimistic 
  If Not adoRS.EOF Then 
     '显示 
     RtbWDTM.Text = "   " + adoRS.Fields("问题").Value + "(" & adoRS.Fields("分数").Value & ")" + vbCrLf 
     '显示答案 
     RtbWDDA.Text = adoRS.Fields("考生答案").Value 
  End If 
 Set adoRS = Nothing 
End Sub 
'预览填空题 
Sub ViewTK(ByVal TMid As Long) '题目id 
  Dim adoRS As Recordset 
  Set adoRS = New Recordset 
  adoRS.CursorLocation = adUseClient 
 
  Dim DaanArr() As String 
  adoRS.Open "select * from 试卷填空题 where ID=" & TMid, LocalConn, adOpenStatic, adLockOptimistic 
  If Not adoRS.EOF Then 
     '显示 
     RtbTK.Text = "   " + adoRS.Fields("问题").Value + "(" & adoRS.Fields("分数").Value & ")" + vbCrLf 
     '显示空和答案 
     Dim i As Integer 
     For i = 1 To 30 
       LabDaan(i).Visible = False 
       TxTDaan(i).Visible = False 
       TxTDaan(i).Text = "" 
     Next i 
     'rtbTK.Tag里面保存空个数,以后可以用 
     RtbTK.Tag = adoRS.Fields("空数").Value 
     For i = 1 To adoRS.Fields("空数").Value 
       LabDaan(i).Visible = True 
       TxTDaan(i).Visible = True 
     Next i 
    '显示答案 
     If Len(adoRS.Fields("考生答案").Value) > 0 Then 
       DaanArr = Split(adoRS.Fields("考生答案").Value, "▲▲") 
       For i = 0 To UBound(DaanArr) 
        TxTDaan(i + 1).Text = DaanArr(i) 
       Next i 
     End If 
  End If 
 Set adoRS = Nothing 
End Sub 
'看选择题 
Sub ViewTM(ByVal adoTMRs As Recordset) 
  Dim DAArr() As String 
  Dim i As Integer 
   
  TXTView.Text = "  " + adoTMRs.Fields("问题").Value + "(" + Str(adoTMRs.Fields("分数").Value) + "分" + ")" + vbCrLf 
   
  TXTView.Text = TXTView.Text + "    A、" + adoTMRs.Fields("A").Value + vbCrLf + vbCrLf 
  TXTView.Text = TXTView.Text + "    B、" + adoTMRs.Fields("B").Value + vbCrLf + vbCrLf 
  TXTView.Text = TXTView.Text + "    C、" + adoTMRs.Fields("C").Value + vbCrLf + vbCrLf 
  TXTView.Text = TXTView.Text + "    D、" + adoTMRs.Fields("D").Value + vbCrLf + vbCrLf 
  '清空 
  For i = 0 To 3 
    Check1(i).Value = 0 
  Next i 
  '显示答案 
  If Len(adoTMRs.Fields("考生答案").Value) > 0 Then 
   DAArr = Split(adoTMRs.Fields("考生答案").Value, ",") 
   For i = 0 To UBound(DAArr) 
     Check1(Asc(DAArr(i)) - 65).Value = 1 
   Next i 
  End If 
   
End Sub 
'保存选择题 
Sub SaveDaAN() 
Dim i As Integer 
Dim DAan As String 
For i = 0 To 3 
If Check1(i).Value Then 
   DAan = DAan & Check1(i).Caption & "," 
End If 
Next i 
If DAan = "" Then DAan = "," '若此题未做 
DAan = Left(DAan, Len(DAan) - 1) 
Dim sql As String 
sql = "update 试卷选择题 set 考生答案='" & DAan & "' where id=" & Val(TXTView.Tag) 
LocalConn.Execute sql 
End Sub 
''保存作文题 
Sub SaveZW() 
  If LstZW.Tag = "" Then 
    Exit Sub 
  End If 
  Dim ID As String 
  ID = LstZW.Tag 
 
  '保存 
  Dim DAan As String 
  DAan = RtbZW.Text 
  Dim sql As String 
  sql = "update 试卷作文题 set 考生答案='" & DAan & "' where id=" & ID 
  LocalConn.Execute sql 
End Sub 
''保存问答题 
Sub SaveWD() 
  If LstWD.Tag = "" Then 
    Exit Sub 
  End If 
  Dim ID As String 
  ID = LstWD.Tag 
   
  Dim DAan As String 
  DAan = RtbWDDA.Text 
  Dim sql As String 
  sql = "update 试卷问答题 set 考生答案='" & DAan & "' where id=" & ID 
  LocalConn.Execute sql 
End Sub 
''保存判断题 
Sub SavePD() 
  If LstPD.Tag = "" Then 
    Exit Sub 
  End If 
  Dim ID As String 
  ID = LstPD.Tag 
   
  Dim DAan As String 
  If OptDui = True Then 
    DAan = "T" 
  End If 
  If OptCuo = True Then 
    DAan = "F" 
  End If 
  Dim sql As String 
  sql = "update 试卷判断题 set 考生答案='" & DAan & "' where id=" & ID 
  LocalConn.Execute sql 
End Sub 
''保存填空题 
Sub SaveTK() 
  If LstTK.Tag = "" Then 
    Exit Sub 
  End If 
  Dim ID As String 
  ID = LstTK.Tag 
   
  Dim i As Integer 
  Dim DAan As String 
  For i = 1 To Val(RtbTK.Tag) 
    DAan = DAan & TxTDaan(i).Text & "▲▲" 
  Next i 
  DAan = Left(DAan, Len(DAan) - 2) 
  Dim sql As String 
  sql = "update 试卷填空题 set 考生答案='" & DAan & "' where id=" & ID 
  LocalConn.Execute sql 
End Sub 
 
'处理交卷 
'"▼▼"用于分割各填空题、问答题、作文的答案 
'"▲▲"用于分割填空题各个空的字符 
'函数返回true和false表示交卷是否成功 
Function JiaoJuan() As Boolean 
  JiaoJuan = False 
  Dim Scores As Long '成绩 
  'Dim Zscore As Long '总分 
  Dim Danxuan As String, Duoxuan As String  '答案字符串 
  Dim Danxuans As String, Duoxuans As String  '对应的分数字符串 
  Dim Danxuanid As String, Duoxuanid As String  '对应的试卷ID字符串 
  Dim TianKong As String, TianKongs As String, TianKongID As String '填空题 
  Dim PanDuan As String, PanDuans As String, PanDuanID As String '判断题 
  Dim WenDa As String, WenDas As String, WenDaID As String '问答题 
  Dim ZuoWen As String, ZuoWens As String, ZuoWenID As String '作文题 
  Dim TestID As Long '试卷标号 
  '试卷基本信息 
  Dim tempRS As Recordset 
  Set tempRS = New Recordset 
  tempRS.CursorLocation = adUseClient 
 
  tempRS.Open "试卷信息", LocalConn, adOpenStatic, adLockOptimistic 
  TestID = tempRS.Fields("试卷编号").Value 
  'Zscore = tempRS.Fields("试卷总分").Value  '总分 
  tempRS.Close 
  Set tempRS = Nothing 
   
  Dim rs As Recordset 
  Set rs = New Recordset 
  rs.CursorLocation = adUseClient 
 
  '选择题 
  rs.Open "试卷选择题", LocalConn, adOpenStatic, adLockOptimistic 
  Do While Not rs.EOF 
     If rs.Fields("类别").Value = "单" Then 
        If rs.Fields("考生答案").Value <> "" Then 
           Danxuan = Danxuan + rs.Fields("考生答案") + "/" 
        Else 
           Danxuan = Danxuan + "o" + "/" 
        End If 
        '试卷分数,ID'不正确分数为0 
        If rs.Fields("考生答案").Value = rs.Fields("答案").Value Then 
            Scores = Scores + rs.Fields("分数").Value 
            Danxuans = Danxuans + Trim(Str(rs.Fields("分数").Value)) + "," 
           Else 
            Danxuans = Danxuans + "0," 
        End If 
        Danxuanid = Danxuanid + Trim(Str(rs.Fields("ID").Value)) + "," 
     ElseIf rs.Fields("类别").Value = "多" Then 
        If rs.Fields("考生答案").Value <> "" Then 
            Duoxuan = Duoxuan + rs.Fields("考生答案").Value + "/" 
        Else 
            Duoxuan = Duoxuan + "o" + "/" 
        End If 
        '试卷分数,ID'不正确分数为0 
        If rs.Fields("考生答案").Value = rs.Fields("答案").Value Then 
            Scores = Scores + rs.Fields("分数").Value 
            Duoxuans = Duoxuans + Trim(Str(rs.Fields("分数").Value)) + "," 
           Else 
            Duoxuans = Duoxuans + "0," 
        End If 
        Duoxuanid = Duoxuanid + Trim(Str(rs.Fields("ID").Value)) + "," 
     End If 
    
     rs.MoveNext 
  Loop 
  '填空题 
  rs.Close 
  rs.Open "试卷填空题", LocalConn, adOpenStatic, adLockOptimistic 
  Do While Not rs.EOF 
    TianKong = TianKong + rs.Fields("考生答案").Value + "▼▼" 
    TianKongID = TianKongID & rs.Fields("ID").Value & "," 
    TianKongs = TianKongs + "," 
    rs.MoveNext 
  Loop 
   
  '填判断 
  rs.Close 
  rs.Open "试卷判断题", LocalConn, adOpenStatic, adLockOptimistic 
  Do While Not rs.EOF 
    PanDuan = PanDuan + rs.Fields("考生答案").Value + "," 
    PanDuanID = PanDuanID & rs.Fields("ID").Value & "," 
    If rs.Fields("考生答案").Value = rs.Fields("答案").Value Then 
      Scores = Scores + rs.Fields("分数").Value 
      PanDuans = PanDuans & rs.Fields("分数").Value & "," 
     Else 
      PanDuans = PanDuans + "0," 
    End If 
    rs.MoveNext 
  Loop 
   
  '问答题 
  rs.Close 
  rs.Open "试卷问答题", LocalConn, adOpenStatic, adLockOptimistic 
  Do While Not rs.EOF 
    WenDa = WenDa + rs.Fields("考生答案").Value + "▼▼" 
    WenDaID = WenDaID & rs.Fields("ID").Value & "," 
    WenDas = WenDas + "," 
    rs.MoveNext 
  Loop 
   
 '作文题 
  rs.Close 
  rs.Open "试卷作文题", LocalConn, adOpenStatic, adLockOptimistic 
  Do While Not rs.EOF 
    ZuoWen = ZuoWen + rs.Fields("考生答案").Value + "▼▼" 
    ZuoWenID = ZuoWenID & rs.Fields("ID").Value & "," 
    ZuoWens = ZuoWens + "," 
    rs.MoveNext 
  Loop 
  '判断是否有该题型,没有则处理 
  If Danxuan = "" Then 
    Danxuan = "/" 
    Danxuans = "," 
    Danxuanid = "," 
  End If 
  If Duoxuan = "" Then 
    Duoxuan = "/" 
    Duoxuans = "," 
    Duoxuanid = "," 
  End If 
  If TianKong = "" Then 
    TianKong = "▼▼" 
    TianKongID = "," 
    TianKongs = "," 
  End If 
  If PanDuan = "" Then 
    PanDuan = "," 
    PanDuanID = "," 
    PanDuans = "," 
  End If 
  If WenDa = "" Then 
    WenDa = "▼▼" 
    WenDaID = "," 
    WenDas = "," 
  End If 
  If ZuoWen = "" Then 
    ZuoWen = "▼▼" 
    ZuoWenID = "," 
    ZuoWens = "," 
  End If 
  '选择 
  Danxuan = Left(Danxuan, Len(Danxuan) - 1) 
  Duoxuan = Left(Duoxuan, Len(Duoxuan) - 1) 
  Danxuans = Left(Danxuans, Len(Danxuans) - 1) 
  Duoxuans = Left(Duoxuans, Len(Duoxuans) - 1) 
  Danxuanid = Left(Danxuanid, Len(Danxuanid) - 1) 
  Duoxuanid = Left(Duoxuanid, Len(Duoxuanid) - 1) 
  '填空 
  TianKong = Left(TianKong, Len(TianKong) - 2) 
  TianKongID = Left(TianKongID, Len(TianKongID) - 1) 
  TianKongs = Left(TianKongs, Len(TianKongs) - 1) 
  ' 判断 
  PanDuan = Left(PanDuan, Len(PanDuan) - 1) 
  PanDuanID = Left(PanDuanID, Len(PanDuanID) - 1) 
  PanDuans = Left(PanDuans, Len(PanDuans) - 1) 
  '问答 
  WenDa = Left(WenDa, Len(WenDa) - 2) 
  WenDaID = Left(WenDaID, Len(WenDaID) - 1) 
  WenDas = Left(WenDas, Len(WenDas) - 1) 
  '作文 
  ZuoWen = Left(ZuoWen, Len(ZuoWen) - 2) 
  ZuoWenID = Left(ZuoWenID, Len(ZuoWenID) - 1) 
  ZuoWens = Left(ZuoWens, Len(ZuoWens) - 1) 
  '提交分数 
  Dim RemoteConn As Connection 
  Set RemoteConn = New Connection 
  Dim sql As String 
  Dim ID As Long 
  RemoteConn.Open ConnString ' 
  ID = GetAutoID("score") 
  '判断题和基本信息 
  sql = "insert into score(id,studentid,testid,testtime,score,danxuan,danxuanid,danxuans,duoxuan,duoxuanid,duoxuans,complete) values(" & ID & "," + StudentID + "," & TestID & ",'" + Format(Date, "yyyy-mm-dd") & "'," & Scores & ",'" + Danxuan + "','" + Danxuanid + "','" + Danxuans + "','" + Duoxuan + "','" + Duoxuanid + "','" + Duoxuans + "','F')" 
  RemoteConn.Execute sql 
  '填空题 
  If TianKong <> "" Then 
   sql = "insert into scoreTK(id,tiankong,tiankongid,tiankongs) values (" & ID & ",'" + TianKong + "','" + TianKongID + "','" + TianKongs + "')" 
   RemoteConn.Execute sql 
  End If 
   
  '判断题 
  If PanDuan <> "" Then 
    sql = "insert into scorePD(id,panduan,panduanid,panduans) values (" & ID & ",'" + PanDuan + "','" + PanDuanID + "','" + PanDuans + "')" 
    RemoteConn.Execute sql 
  End If 
   
  '问答题 
  If WenDa <> "" Then 
    sql = "insert into scoreWD(id,wenda,wendaid,wendas) values (" & ID & ",'" + WenDa + "','" + WenDaID + "','" + WenDas + "')" 
    RemoteConn.Execute sql 
  End If 
   
  '作文题 
  If ZuoWen <> "" Then 
    sql = "insert into scoreZW(id,zuowen,zuowenid,zuowens) values (" & ID & ",'" + ZuoWen + "','" + ZuoWenID + "','" + ZuoWens + "')" 
    RemoteConn.Execute sql 
  End If 
   
  '释放资源 
  rs.Close 
  Set rs = Nothing 
  RemoteConn.Close 
  Set RemoteConn = Nothing 
  JiaoJuan = True 
  MsgBox "你的选择题和判断题的总成绩为 " & Scores & " 分" + vbCrLf + "其他题型等老师判完卷以后才知道!" 
   
End Function 
 
 
Sub DelDB() '删除数据库 
  Dim sql As String 
  sql = "delete from 试卷选择题" 
  LocalConn.Execute sql 
  sql = "delete from 试卷信息" 
  LocalConn.Execute sql 
  sql = "delete from 试卷填空题" 
  LocalConn.Execute sql 
  sql = "delete from 试卷判断题" 
  LocalConn.Execute sql 
  sql = "delete from 试卷问答题" 
  LocalConn.Execute sql 
  sql = "delete from 试卷作文题" 
  LocalConn.Execute sql 
  If Dir(App.Path + "\temp.html") <> "" Then 
     Kill App.Path + "\temp.html" 
  End If 
End Sub