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

📄 frmreadpapers.frm

📁 此源码是针对配套的光学标记阅读机使用
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Object = "{0ECD9B60-23AA-11D0-B351-00A0C9055D8E}#6.0#0"; "MSHFLXGD.OCX"
Begin VB.Form frmreadpapers 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "阅读试卷"
   ClientHeight    =   6255
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   9675
   Icon            =   "frmreadpapers.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6255
   ScaleWidth      =   9675
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "评分"
      Height          =   495
      Left            =   5640
      TabIndex        =   13
      Top             =   5640
      Width           =   1455
   End
   Begin VB.Frame Frame1 
      Height          =   5175
      Index           =   0
      Left            =   120
      TabIndex        =   1
      Top             =   120
      Width           =   9375
      Begin VB.CommandButton cmdread 
         Caption         =   "阅读"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   5160
         TabIndex        =   11
         Top             =   4320
         Width           =   1935
      End
      Begin VB.Frame Frame2 
         Caption         =   "提示信息"
         Height          =   1815
         Left            =   4920
         TabIndex        =   9
         Top             =   2280
         Width           =   4095
         Begin VB.TextBox txtResult 
            BackColor       =   &H8000000F&
            BorderStyle     =   0  'None
            Enabled         =   0   'False
            Height          =   1095
            Left            =   120
            ScrollBars      =   1  'Horizontal
            TabIndex        =   10
            Top             =   240
            Width           =   2175
         End
      End
      Begin VB.Frame Frame1 
         Caption         =   "阅读状态"
         Height          =   1815
         Index           =   1
         Left            =   4920
         TabIndex        =   3
         Top             =   360
         Width           =   4095
         Begin VB.TextBox Text1 
            Height          =   1215
            Left            =   5400
            TabIndex        =   4
            Text            =   "Text1"
            Top             =   360
            Width           =   975
         End
         Begin VB.Label Label6 
            BackStyle       =   0  'Transparent
            Height          =   255
            Left            =   2040
            TabIndex        =   8
            Top             =   1320
            Width           =   1095
         End
         Begin VB.Label Label1 
            BackStyle       =   0  'Transparent
            Height          =   255
            Left            =   1560
            TabIndex        =   7
            Top             =   720
            Width           =   2655
         End
         Begin VB.Label Label4 
            BackStyle       =   0  'Transparent
            Caption         =   "阅读过的信息卡总数"
            Height          =   255
            Left            =   240
            TabIndex        =   6
            Top             =   1320
            Width           =   1695
         End
         Begin VB.Label Label3 
            BackStyle       =   0  'Transparent
            Caption         =   "当前OMR型号"
            Height          =   375
            Left            =   240
            TabIndex        =   5
            Top             =   720
            Width           =   1095
         End
      End
      Begin VB.CommandButton Command3 
         Caption         =   "清空数据库"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   7200
         TabIndex        =   2
         Top             =   4320
         Width           =   1935
      End
      Begin MSHierarchicalFlexGridLib.MSHFlexGrid MSHFlexGrid1 
         Height          =   4515
         Left            =   120
         TabIndex        =   12
         Top             =   240
         Width           =   4635
         _ExtentX        =   8176
         _ExtentY        =   7964
         _Version        =   393216
         BackColor       =   16777215
         Cols            =   3
         FixedCols       =   0
         FocusRect       =   2
         AllowUserResizing=   1
         _NumberOfBands  =   1
         _Band(0).Cols   =   3
      End
   End
   Begin VB.Timer mytimer 
      Left            =   5160
      Top             =   7440
   End
   Begin VB.CommandButton cmdquit 
      Caption         =   "退出"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   7440
      TabIndex        =   0
      Top             =   5640
      Width           =   1455
   End
   Begin MSComDlg.CommonDialog cmdl 
      Left            =   8880
      Top             =   3240
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
End
Attribute VB_Name = "frmreadpapers"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim keynames As String
Dim xianshi As Integer





Private Sub pfnew(jieguo As String, kh As String, lx As String, bdkey As String)

End Sub

Private Sub Cmdpf_Click()
sqlfs = "select lx,jieguo from bdkey where  lx='& lx &'"
    Set rsfs = TransactSQL(sqlfs)
    cishu = rsfs.RecordCount
   ' Print cishu
    If rsfs.RecordCount = 0 Then
    Else
    ttxx1 = rsfs.Fields(1)
    End If
    ' Print ttxx1
End Sub

Private Sub cmdquit_Click()
Unload Me
End Sub

Private Sub cmdread_Click()
     Dim strlen As Long
    If IsReading Then
        OMR_StopRead
        cmdread.Caption = "阅读答案"
        mytimer.Enabled = False
        IsReading = False
    Else
        If OMR_ReadNoWait() = 0 Then    'OK
            cmdread.Caption = "停止阅读"
            mytimer.Enabled = True
            IsReading = True
        Else
            txtResult.Text = Space(100)
            strlen = OMR_CRetMess(OMR_GetLastError(), txtResult.Text)
            Dim errsb3 As Integer
           errsb3 = MsgBox(txtResult.Text, vbOKOnly, "阅读失败")
           If errsb3 = 1 Then
           Exit Sub
           End If
        End If
    End If
End Sub

Private Sub Command1_Click()
Dim sqlyy As String
Dim sqlkey As String
Dim sqlfs As String
Dim rs As ADODB.Recordset
Dim ttxx0 As String
Dim ttxx1 As String
Dim jieguo As String
Dim bdkey As String
Dim sqlfsad As String
Dim rsfsad As ADODB.Recordset
Dim rsyy As ADODB.Recordset
Dim rsfs As ADODB.Recordset
Dim qst As Integer
Dim zzt As Integer
Dim zf As Double
Dim fs As Double
Dim lx As String




 sqlyy = "select kh,lx,ttxx from ttxx"
 Set rsyy = TransactSQL(sqlyy)
 If rsyy.RecordCount = 0 Then
   MsgBox "没有阅读考生信息", vbOKCancel, "提示"
   Exit Sub
 Else
 Dim ddd As Integer
 Dim ii As Integer
 ddd = rsyy.RecordCount
 rsyy.MoveFirst
 For ii = 1 To ddd
      lx = rsyy.Fields(1)
      kh = rsyy.Fields(0)
     ttxx0 = rsyy.Fields(2)
     cishu = cishu + cishu
   
    ' Print lx
    ' Print kh
    ' Print ttxx0
     '以上取的 lx kh ttxx0结果
     
     '取的相应标答案
    sqlfs = "select lx,jieguo from bdkey where lx='" & lx & "'"
    Set rsfs = TransactSQL(sqlfs)
    If rsfs.RecordCount = 0 Then
    Else
    ttxx1 = rsfs.Fields(1)
    End If
     '对当前记录进行评分
     zf = 0
      sqlkey = "select qst,zzt,fs from setfs where lx='" & lx & "'"
      Set rs = TransactSQL(sqlkey)
        rs.MoveFirst
      While Not rs.EOF
               qst = Val(rs.Fields(0))
               zzt = Val(rs.Fields(1))
               fs = Val(rs.Fields(2))
               Dim i As Integer
               For i = qst To zzt
                    jieguo = Mid(ttxx0, i, 1)
                    bdkey = Mid(ttxx1, i, 1)
                    
              
                     If bdkey = "0" Then
                     Else
                        If StrComp(jieguo, bdkey, 1) = 0 Then
                            zf = zf + Val(fs)
                            
                        End If
                     End If
                     
               Next i
          rs.MoveNext

⌨️ 快捷键说明

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