VERSION 5.00
Begin VB.Form КомпьютерО 
   AutoRedraw      =   -1  'True
   Caption         =   "КомпьютерО"
   ClientHeight    =   6270
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   10560
   LinkTopic       =   "Form2"
   ScaleHeight     =   6270
   ScaleWidth      =   10560
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command4 
      Caption         =   "Вопрос"
      Height          =   375
      Left            =   5880
      TabIndex        =   3
      Top             =   5760
      Width           =   1335
   End
   Begin VB.CommandButton Command3 
      Caption         =   "№ вопроса"
      Height          =   375
      Left            =   4080
      TabIndex        =   2
      Top             =   5760
      Width           =   1335
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Отмена"
      Height          =   375
      Left            =   9240
      TabIndex        =   1
      Top             =   5760
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Сохранить"
      Height          =   375
      Left            =   7680
      TabIndex        =   0
      Top             =   5760
      Width           =   1215
   End
End
Attribute VB_Name = "КомпьютерО"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim kv(1 To 50) As String, ko(1 To 50) As String, otv, vopr, stra, rfiles As String
Dim i, j, byta, nom, zr As Integer
Private Sub Command1_Click()
byta = MsgBox("Сохранить файл?", 32 + 3, "Вопрос?")
If byta = 2 Then GoTo 2
If Form1.Option6.Value = True Then rfiles = "C:\Комп\Тест1\Komp1.txt"
If Form1.Option7.Value = True Then rfiles = "C:\Комп\Тест2\Komp1.txt"
If Form1.Option8.Value = True Then rfiles = "C:\Комп\Тест3\Komp1.txt"

If byta = 6 Then

 Open rfiles For Output As #1
  For j = 1 To zr
   Print #1, ko(j)
  Next
 Close #1
End If

If byta = 7 Then
 zr = 1
 Open rfiles For Output As #1
  For j = 1 To zr
   Print #1, ko(j)
  Next
 Close #1
 
End If

2 '
End Sub

Private Sub Command2_Click()
Form1.Command6.Visible = True

КомпьютерО.Visible = False
End Sub

Private Sub Command3_Click()
1 nom = InputBox("Введите № вопроса, <= 50 или i", "Ввод №")
If nom > 50 Then GoTo 1
 i = nom
КомпьютерО.Print i; ko(nom)

End Sub

Private Sub Command4_Click()
 If Command4.Visible = False Then
   i = i + 1
   zr = i
 End If
stra = InputBox("Введите Ответ", "Ввод Ответа")

If i > 50 Then
 i = 50
 byta = MsgBox("Вопросов > 50", 48 + 0, "")
End If
ko(i) = stra
КомпьютерО.Print i; ko(i)

End Sub

Private Sub Form_Load()
Command4.Visible = True
Command3.Visible = True
If Form1.Option6.Value = True Or Form1.Option7.Value = True Or Form1.Option8.Value = True Then
byta = MsgBox("-да- Читать файл , -нет- новый ", 32 + 3, "Вопрос")
  If byta = 2 Then GoTo 3

 If Form1.Option6.Value = True Then rfiles = "C:\Комп\Тест1\Komp1.txt"
 If Form1.Option7.Value = True Then rfiles = "C:\Комп\Тест2\Komp1.txt"
 If Form1.Option8.Value = True Then rfiles = "C:\Комп\Тест3\Komp1.txt"
 
 If byta = 6 Then
  Open rfiles For Input As #1
  i = 1
   Do Until EOF(1)
   vopr = ""
7   Input #1, otv
     ko(i) = otv  'vopr +
     i = i + 1
    Loop
   Close #1
  zr = i - 1
  For j = 1 To zr
      КомпьютерО.Print j; ko(j)
  Next
 End If
  If byta = 7 Then
  i = 0
  Command4.Visible = False
 End If

Else
    КомпьютерО.CurrentX = 200
    КомпьютерО.Print " Выберите тест"
    КомпьютерО.Visible = False
End If
3 '

End Sub

Private Sub Form_Resize()
'Text1.Left = ScaleWidth - 200
'Text1.Top = ScaleHeight - 700
Command2.Left = ScaleWidth - 1300
Command1.Left = ScaleWidth - 3300
Command4.Left = ScaleWidth - 5300
Command3.Left = ScaleWidth - 7300
Command2.Top = ScaleHeight - 700
Command1.Top = ScaleHeight - 700
Command4.Top = ScaleHeight - 700
Command3.Top = ScaleHeight - 700
End Sub

Private Sub Text1_Change()

End Sub

