VERSION 5.00
Begin VB.Form frm1 
   BackColor       =   &H00FF8080&
   Caption         =   "Проверка знаний"
   ClientHeight    =   4140
   ClientLeft      =   2250
   ClientTop       =   2520
   ClientWidth     =   7260
   LinkTopic       =   "Form1"
   ScaleHeight     =   4140
   ScaleWidth      =   7260
   Begin VB.CommandButton cmdSave 
      Caption         =   "Сохранить ответы"
      Height          =   495
      Left            =   480
      TabIndex        =   16
      Top             =   3240
      Width           =   1575
   End
   Begin VB.TextBox txtAnsw1 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3840
      TabIndex        =   14
      Top             =   2760
      Width           =   1335
   End
   Begin VB.TextBox txtAnsw2 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3840
      TabIndex        =   12
      Top             =   3360
      Width           =   1335
   End
   Begin VB.TextBox txtNum 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   390
      Left            =   3960
      TabIndex        =   11
      Top             =   135
      Width           =   615
   End
   Begin VB.TextBox txtProbl 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1815
      Left            =   2400
      MultiLine       =   -1  'True
      TabIndex        =   6
      Top             =   600
      Width           =   2775
   End
   Begin VB.CommandButton cmdCont 
      Caption         =   "Начать опрос"
      Height          =   495
      Left            =   480
      TabIndex        =   5
      Top             =   2280
      Width           =   1575
   End
   Begin VB.TextBox txtBall 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   5400
      TabIndex        =   4
      Top             =   2760
      Width           =   1695
   End
   Begin VB.TextBox txtError 
      Alignment       =   1  'Right Justify
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   5400
      TabIndex        =   3
      Top             =   1680
      Width           =   1695
   End
   Begin VB.TextBox txtMsg 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   5400
      TabIndex        =   2
      Top             =   600
      Width           =   1695
   End
   Begin VB.CommandButton cmdAnsw 
      Caption         =   "Считать ответы"
      Height          =   495
      Left            =   480
      TabIndex        =   1
      Top             =   1440
      Width           =   1575
   End
   Begin VB.CommandButton cmdProbl 
      Caption         =   "Считать вопросы"
      Height          =   495
      Left            =   480
      TabIndex        =   0
      Top             =   480
      Width           =   1575
   End
   Begin VB.Label lblAnsw1 
      Alignment       =   2  'Center
      Caption         =   "Введенный  ответ"
      Height          =   495
      Left            =   2400
      TabIndex        =   15
      Top             =   2760
      Width           =   1335
   End
   Begin VB.Label lblAnsw 
      Alignment       =   2  'Center
      Caption         =   "Правильный ответ"
      Height          =   495
      Left            =   2400
      TabIndex        =   13
      Top             =   3360
      Width           =   1335
   End
   Begin VB.Label lblProbl 
      Alignment       =   2  'Center
      Caption         =   "Вопрос"
      Height          =   255
      Left            =   2520
      TabIndex        =   10
      Top             =   240
      Width           =   1215
   End
   Begin VB.Label lblBall 
      Alignment       =   2  'Center
      Caption         =   "Оценка"
      Height          =   255
      Left            =   5400
      TabIndex        =   9
      Top             =   2400
      Width           =   1695
   End
   Begin VB.Label lblerror 
      Alignment       =   2  'Center
      Caption         =   "Количество ошибок"
      Height          =   255
      Left            =   5400
      TabIndex        =   8
      Top             =   1320
      Width           =   1695
   End
   Begin VB.Label lblMsg 
      Alignment       =   2  'Center
      Caption         =   "Сообщение"
      Height          =   255
      Left            =   5400
      TabIndex        =   7
      Top             =   240
      Width           =   1695
   End
End
Attribute VB_Name = "frm1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim bytI, bytK, bytN As Byte, strA(1 To 10), strB(1 To 10), strC(1 To 10) As String
Private Sub cmdProbl_Click()
Open "F:\practicum\VB\Projects\Z5_18\problem.txt" For Input As #1
For bytI = 1 To 10
Input #1, strA(bytI)
Next bytI
Close #1
End Sub
Private Sub cmdAnsw_Click()
Open "F:\practicum\VB\Projects\Z5_18\answer.txt" For Input As #2
For bytI = 1 To 10
Input #2, strB(bytI)
Next bytI
Close #2
End Sub
Private Sub cmdCont_Click()
For bytK = 1 To 10
txtProbl.Text = strA(bytK)
txtNum.Text = Str(bytK)
strC(bytK) = InputBox("Введите ответ", "Ответ")
If strB(bytK) = strC(bytK) _
Then txtMsg.Text = "Правильно!" _
Else txtMsg.Text = "Неправильно!": bytN = bytN + 1
txtError.Text = Str(bytN)
txtAnsw1.Text = strC(bytK)
txtAnsw2.Text = strB(bytK)
MsgBox "Следующий вопрос?"
Next bytK
Select Case bytN
Case 0
txtBall.Text = "Отлично"
Case 1
txtBall.Text = "Хорошо"
Case 2
txtBall.Text = "Удовлетворительно"
Case Is > 2
txtBall.Text = "Неудовлетворительно"
End Select
End Sub
Private Sub cmdSave_Click()
Open "F:\practicum\VB\Projects\Z5_18\student.txt" For Output As #3
For bytI = 1 To 10
Write #3, strC(bytI)
Next bytI
Close #3
End Sub

