frmtj.frm

来自「VB6.0应用例题」· FRM 代码 · 共 173 行

FRM
173
字号
VERSION 5.00
Begin VB.Form Frmtj 
   Caption         =   "统计"
   ClientHeight    =   5730
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7275
   LinkTopic       =   "Form4"
   ScaleHeight     =   5730
   ScaleWidth      =   7275
   StartUpPosition =   3  '窗口缺省
   Begin VB.ListBox Lstda 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   3765
      Left            =   1200
      TabIndex        =   2
      Top             =   240
      Width           =   4455
   End
   Begin VB.CommandButton Cmdml 
      Caption         =   "结束"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Index           =   1
      Left            =   3720
      TabIndex        =   1
      Top             =   4920
      Width           =   1575
   End
   Begin VB.CommandButton Cmdml 
      Caption         =   "补做"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Index           =   0
      Left            =   1560
      TabIndex        =   0
      Top             =   4920
      Width           =   1575
   End
   Begin VB.Label Label3 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FFFF&
      Height          =   375
      Left            =   4680
      TabIndex        =   5
      Top             =   4320
      Width           =   1455
   End
   Begin VB.Label Label2 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   375
      Left            =   2880
      TabIndex        =   4
      Top             =   4320
      Width           =   1455
   End
   Begin VB.Label Label1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1080
      TabIndex        =   3
      Top             =   4320
      Width           =   1455
   End
End
Attribute VB_Name = "Frmtj"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Cmdml_Click(Index As Integer)
Dim i      As Integer
    Unload Me
    If Index = 1 Then
      Unload Frmxz
      da = ""
      For i = 1 To TiShu(StNum)
         If KsDa(i) = "" Then
            KsDa(i) = Space(1)
         End If
         da = da & KsDa(i)
       Next
       Open "ksda" & Trim(Str(StNum)) & ".txt" For Output As #1
         Print #1, da
       Close #1
       frmtc.Show
    End If

End Sub

Private Sub Form_Load()
Dim i              As Integer
Dim zqnum          As Integer
Dim cwnum          As Integer
Dim Entry          As String
   zqnum = 0
   cwnum = 0
   Frmtj.Caption = "统计结果"
   For i = 1 To TiShu(StNum)
       If RTrim(LTrim(KsDa(i))) <> "" And KsDa(i) = BzDa(i) Then
          Entry = "第" & Format(i, "00") & "题       正确"
          zqnum = zqnum + 1
       ElseIf RTrim(LTrim(KsDa(i))) = "" Then
          Entry = "第" & Format(i, "00") & "题       未做"
       Else
          Entry = "第" & Format(i, "00") & "题       错误"
          cwnum = cwnum + 1
       End If
       Lstda.AddItem Entry
   Next
   CenterOnSetupForm Me
   Label1.Caption = "正确:" & Str(zqnum) & "题"
   Label2.Caption = "错误:" & Str(cwnum) & "题"
   Label3.Caption = "未做:" & Str(TiShu(StNum) - zqnum - cwnum) & "题"

End Sub


Private Sub Lstda_DblClick()
    ti = Val(Lstda.ListIndex + 1)
    Unload Me

End Sub

⌨️ 快捷键说明

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