VERSION 5.00
Begin VB.Form Form1 
   BackColor       =   &H00000000&
   Caption         =   "Созвездие"
   ClientHeight    =   9075
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   11730
   BeginProperty Font 
      Name            =   "Courier New"
      Size            =   12
      Charset         =   204
      Weight          =   700
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   ForeColor       =   &H00FFFF80&
   Icon            =   "СОЗВЕЗ~1.frx":0000
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   Picture         =   "СОЗВЕЗ~1.frx":0442
   ScaleHeight     =   605
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   782
   StartUpPosition =   3  'Windows Default
   Begin VB.CheckBox Check4 
      Caption         =   "Check4"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   9.75
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   5040
      TabIndex        =   11
      Top             =   8640
      Width           =   255
   End
   Begin VB.CommandButton Command6 
      Caption         =   "Тест2 выбор"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   9.75
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   4560
      TabIndex        =   10
      Top             =   7920
      Width           =   1215
   End
   Begin VB.ListBox List2 
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      BeginProperty DataFormat 
         Type            =   1
         Format          =   "0;(0)"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   1049
         SubFormatType   =   1
      EndProperty
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   9.75
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   2670
      ItemData        =   "СОЗВЕЗ~1.frx":899CA
      Left            =   120
      List            =   "СОЗВЕЗ~1.frx":899CC
      TabIndex        =   9
      Top             =   5160
      Width           =   11295
   End
   Begin VB.ListBox List1 
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      BeginProperty DataFormat 
         Type            =   1
         Format          =   "0"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   1049
         SubFormatType   =   1
      EndProperty
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   9.75
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   2190
      ItemData        =   "СОЗВЕЗ~1.frx":899CE
      Left            =   120
      List            =   "СОЗВЕЗ~1.frx":899D0
      TabIndex        =   8
      Top             =   2040
      Width           =   11295
   End
   Begin VB.CommandButton Command5 
      Caption         =   "Справка"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   9360
      MaskColor       =   &H8000000F&
      TabIndex        =   7
      Top             =   7920
      Width           =   1215
   End
   Begin VB.CheckBox Check3 
      Caption         =   "Check3"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   7560
      TabIndex        =   6
      Top             =   8640
      Width           =   255
   End
   Begin VB.CheckBox Check2 
      Caption         =   "Check2"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   2760
      TabIndex        =   5
      Top             =   8640
      Width           =   255
   End
   Begin VB.CheckBox Check1 
      Caption         =   "Check1"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   720
      TabIndex        =   4
      Top             =   8640
      Width           =   255
   End
   Begin VB.CommandButton Command4 
      Caption         =   "Выход"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   9360
      TabIndex        =   3
      Top             =   8640
      Width           =   1215
   End
   Begin VB.CommandButton Command3 
      Caption         =   "Результат"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   6960
      TabIndex        =   2
      Top             =   7920
      Width           =   1335
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Тест1 да/нет"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   2280
      TabIndex        =   1
      Top             =   7920
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Обучение"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   240
      TabIndex        =   0
      Top             =   7920
      Width           =   1215
   End
   Begin VB.Label Label2 
      Caption         =   "Ответы"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   240
      TabIndex        =   13
      Top             =   4680
      Width           =   1455
   End
   Begin VB.Label Label1 
      Caption         =   "Вопросы"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   240
      TabIndex        =   12
      Top             =   1560
      Width           =   1335
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim zvezda(1 To 30) As String, sozv(1 To 30) As String
Dim otv1(1 To 20) As String, otv(1 To 20) As Integer, protv As Integer, i As Integer, info As String, old(1 To 20) As Integer
Dim fl1 As Boolean, fl2 As Boolean, j As Integer, t As Integer, covp As Integer, rez As Single, oz As String, osh As Integer, k As Integer
Dim cw As Long, kk As Integer, uch(1 To 20) As Integer, um1(1 To 20) As Integer, um2(1 To 20) As Integer, itogo As Integer, r As Integer

Private Sub Check1_Click()
 Command1.Enabled = True
 Command2.Enabled = False
 Command3.Enabled = False
 Command6.Enabled = False
If Check1.Value = 0 Then Command1.Enabled = False
 Check2.Value = 0
Check3.Value = 0
Check4.Value = 0

Form1.Cls
End Sub

Private Sub Check2_Click()
 Command2.Enabled = True
 Command1.Enabled = False
 Command3.Enabled = False
  Command6.Enabled = False
If Check2.Value = 0 Then Command2.Enabled = False

 Check1.Value = 0
Check3.Value = 0
Check4.Value = 0

Form1.Cls
End Sub

Private Sub Check3_Click()
 Command3.Enabled = True
 
 Command2.Enabled = False
 Command1.Enabled = False
 Command6.Enabled = False
 If Check3.Value = 0 Then Command3.Enabled = False

Check4.Value = 0
Check2.Value = 0
Check1.Value = 0
Form1.Cls
End Sub

Private Sub Combo1_Change()

End Sub

Private Sub Check4_Click()
 Command3.Enabled = False
 Command1.Enabled = False
 Command2.Enabled = False
 Command6.Enabled = True
 If Check4.Value = 0 Then Command6.Enabled = False

 Check2.Value = 0
Check1.Value = 0
Check3.Value = 0

Form1.Cls

End Sub

Private Sub Command1_Click()
List1.Enabled = True
List2.Enabled = False
List2.Height = 180

If Command1.Enabled = True Then
Check2.Value = 0
Check3.Value = 0
List1.Visible = True
List2.Visible = True
kk = 0
covp = 0
oz = ""
rez = 0
For i = 1 To 16
old(i) = 0
Next
k = 0

fl1 = 0
fl2 = 0
List1.Clear
List1.ForeColor = 5444444
List1.FontSize = 11
List2.Clear
List2.ForeColor = 6444
List2.FontSize = 11

For i = 1 To 16
List1.AddItem zvezda(i)
Next
For i = 1 To 16
List2.AddItem sozv(i)
Next
End If
Check1.Value = 0
 Command1.Enabled = False

End Sub

Private Sub Command2_Click()
Dim info As String
itogo = 0
List1.Enabled = False
List2.Enabled = False
List1.Visible = False
List2.Visible = False

 Command3.Enabled = False
 Command1.Enabled = False
 Command2.Enabled = True
 Command6.Enabled = False

If zvezda(1) = "" Then GoTo 3

If Command2.Enabled = True Then
Check1.Value = 0
Check3.Value = 0
k = k + 1
Randomize (Timer)
kk = 0
covp = 0
oz = ""
rez = 0

For i = 1 To 16
old(i) = 0
Next

For i = 1 To 16
Form1.ForeColor = 4444444
Form1.FontSize = 12
Form1.FontBold = True
Form1.Cls
Form1.Print zvezda(i)
itogo = i
1 j = Int(Rnd * 17 - i) + i
fl1 = 0

For t = 1 To i
If j = old(t) Then fl1 = 1
Next

If fl1 = 0 Then old(i) = j Else GoTo 1
Form1.ForeColor = 7444444

Form1.Print sozv(j)

otv1(i) = InputBox("да - 1 или нет - 0")
otv(i) = Val(otv1(i))
If j = i Then
covp = covp + 1
End If

If j = i And otv(i) = 1 Then
protv = protv + 1
End If

If j <> i And otv(i) = 0 Then
protv = protv + 1
End If

If (j <> i And otv(i) = 1) Or (j = i And otv(i) = 0) Then
osh = osh + 1
End If
Next
End If
Form1.FontBold = False
3 If zvezda(1) = "" Then
info = "Нажмите клавишу ОБУЧЕНИЕ"
List2.AddItem info
End If
 Command3.Enabled = False
 Command1.Enabled = False
 Command2.Enabled = False
 Command6.Enabled = False
List1.Enabled = True
List2.Enabled = True
List1.Visible = True
List2.Visible = True
Check3.Value = 0
End Sub

Private Sub Command3_Click()
Dim Stra As String
List2.Height = 180

List1.Enabled = True
List2.Enabled = True

If Command6.Enabled = True Then
 Command1.Enabled = False
 Command2.Enabled = False
 'Command6.Enabled = False

End If
If Command1.Enabled = True Then
 Command6.Enabled = False
 Command2.Enabled = False
 'Command1.Enabled = False
End If
If Command2.Enabled = True Then
 Command6.Enabled = False
 Command1.Enabled = False
 'Command2.Enabled = False
End If


List2.Clear
List1.Clear
If zvezda(1) = "" And otv1(1) = "" Then GoTo 4

kk = 0
List2.FontSize = 12
List2.FontBold = True
List1.ForeColor = 255

If itogo >= 16 Then
If Command2 = True Then
protv = 0
osh = 0
End If

For i = 1 To 16
kk = kk + 1
List1.AddItem zvezda(i)
List2.ForeColor = 7444444

If Command2 = True Then
info = sozv(i) + Str(otv(i))
End If

If Command6 = True Or Command1 = True Then
info = sozv(i) + Str(otv(um2(kk)))
End If
List2.AddItem info 'sozv(i)
info = ""
Next

If covp <> 0 And (Command6.Enabled = True Or Command1 = True) Then
List2.ForeColor = 255
Stra = Str(covp) + " cовпало"
List2.AddItem Stra
rez = protv / 16 * 100
End If

If covp <> 0 And Command2.Enabled = True Then
List2.ForeColor = 255
Stra = Str(covp) + " cовпало"
List2.AddItem Stra
rez = protv / 16 * 100
End If

If covp = 0 And Command2.Enabled = True Then
Stra = "Совпадений "
List1.AddItem Stra
Stra = "не было"
List1.AddItem Stra
rez = 100
End If

If covp = 0 And (Command6.Enabled = True Or Command1 = True) Then
Stra = "Совпадений "
List1.AddItem Stra
Stra = "не было"
List1.AddItem Stra
rez = 0

For i = 1 To 16
otv(i) = 0
Next

End If

List2.ForeColor = 4444444

If rez = 100 Then oz = "5"
If rez < 100 And rez >= 80 Then oz = "4"
If rez < 80 And rez >= 50 Then oz = "3"
If rez < 50 And rez >= 30 Then oz = "2"
If rez < 30 And rez >= 0 Then oz = "1"

List2.ForeColor = 255
Stra = Str(rez) + "%" + " правильных ответов,"
List2.AddItem Stra
Stra = " ошибок - " + Str(osh)
List2.AddItem Stra
List2.FontSize = 14
Stra = "оценка " + oz
List2.AddItem Stra
Else
Stra = "Должно быть 16 ответов"
List2.AddItem Stra
End If
4 If zvezda(1) = "" Then
info = "Ишь чего захотел."
List2.AddItem info
info = "Нажмите клавишу ОБУЧЕНИЕ"
List2.AddItem info
info = "затем клавишу ТЕСТ"
List2.AddItem info
End If
 Command3.Enabled = True
 Command2.Enabled = False
 Command1.Enabled = False
 Command6.Enabled = False
 'If Check3.Value = 1 Then GoTo 55
itogo = 0
List2.FontBold = False
List2.FontSize = 11
osh = 0
protv = 0
55 '
End Sub

Private Sub Command4_Click()

List1.Clear
List2.Clear
List1.Visible = False
List2.Visible = False
End
End Sub

Private Sub Command5_Click()
Dim Stra As String
List1.Visible = True
List2.Visible = True
List1.Enabled = True
List2.Enabled = True

List1.Clear
List2.Clear
List2.FontSize = 12
List2.ForeColor = 4444444

If fl1 = False And fl2 = False Then
Stra = "Нажимай кнопки и работай, "
List2.AddItem Stra
Stra = "работай и работай!"
List2.AddItem Stra
Else
List2.ForeColor = 255
List2.FontBold = True
Stra = "Сказано же, "
List2.AddItem Stra
Stra = "работай и работай!"
List2.AddItem Stra
End If
Stra = "Для ТЕСТ1 при совпадении"
List2.AddItem Stra
Stra = "введите 1-да, либо 0-нет"
List2.AddItem Stra
List2.ForeColor = 25555
Stra = "Для ТЕСТ2 кликни мышкой"
List2.AddItem Stra
Stra = "сначала вопрос,"
List2.AddItem Stra
Stra = "затем ответ."
List2.AddItem Stra

List2.FontBold = False
fl1 = True
End Sub

Private Sub Command6_Click()

Dim info As String
List2.Height = 180

List1.Enabled = True
List2.Enabled = False

 Command3.Enabled = False
 Command1.Enabled = False
 Command2.Enabled = False
 Command6.Enabled = True
kk = 0
covp = 0
oz = ""
rez = 0
Randomize (Timer)
i = 0
t = 0
For i = 1 To 16
10 j = Int(Rnd * 18) + 1
fl1 = 0
For t = 1 To i
If j = old(t) Then fl1 = 1
Next
If fl1 = 0 And j <= 16 Then old(i) = j Else: GoTo 10
Next
List2.Clear

info = ""
For i = 1 To 16
List1.AddItem info = ""
List2.AddItem info = ""
Next

k = 0
fl1 = False
fl2 = False
List1.Visible = True
List2.Visible = True
If zvezda(1) = "" Then GoTo 5
If Command6.Enabled = True Then
Check1.Value = 0
Check3.Value = 0
Check2.Value = 0

List1.Clear
List1.ForeColor = 5444444
List1.FontSize = 11

List2.Clear
List2.ForeColor = 6444
List2.FontSize = 11
kk = 1
For i = 1 To 16
List1.AddItem zvezda(i)
List2.AddItem sozv(old(i))
Next
For i = 1 To 16
kk = i
um2(kk) = old(i)
Next
End If

5 If zvezda(1) = "" Then
info = "Нажмите клавишу ОБУЧЕНИЕ"
List2.AddItem info
End If
 Command6.Enabled = False
Check4.Value = 0
End Sub

Private Sub Form_Load()
 Command2.Enabled = False
 Command1.Enabled = False
 Command3.Enabled = False
 Command6.Enabled = False
 List2.Enabled = False

kk = 0
covp = 0
oz = ""
rez = 0
r = 0
For i = 1 To 16
old(i) = 0
Next
k = 0
fl1 = 0
fl2 = 0

List1.Clear
List1.ForeColor = 5444444
List1.FontSize = 11

Open "Звёзды_в.txt" For Input As #1
i = 1
Do Until EOF(1)
Input #1, zvezda(i)
i = i + 1
r = i
Loop
Close #1

List2.Clear
List2.ForeColor = 6444
List2.FontSize = 11

Open "Звёзды_о.txt" For Input As #1
i = 1
Do Until EOF(1)
Input #1, sozv(i)
i = i + 1
Loop
Close #1

List1.Visible = False
List2.Visible = False

End Sub

Private Sub List1_Click()
If itogo >= 16 Then GoTo 20

Form1.Cls
itogo = itogo + 1
If itogo > 16 Then itogo = 16

If (fl1 = False And fl2 = False) And Command6.Enabled = True Then
k = List1.ListIndex + 1
um1(k) = List1.ListIndex + 1
Form1.Print zvezda(k)
fl1 = True
Else
k = List1.ListIndex + 1
um1(k) = List1.ListIndex + 1
Form1.Print zvezda(k)
fl1 = True
End If
List2.Enabled = True
List1.Enabled = False
If fl1 = True And fl2 = True Then
fl1 = False
fl2 = False
info = ""
End If
20 '
End Sub

Private Sub List2_Click()
If itogo > 16 Then GoTo 30

If (fl1 = True And fl2 = False) And Command6.Enabled = True Then
kk = (List2.ListIndex) + 1
fl2 = True

Else
kk = (List2.ListIndex + 1)
um2(kk) = (List2.ListIndex + 1)
If sozv(um1(k)) = sozv(um2(kk)) Then
fl2 = True
 Form1.Print sozv(um2(kk)); " верно"
End If
End If

If sozv(um1(k)) = sozv(um2(kk)) Then
 protv = protv + 1
 otv(k) = 1
 covp = covp + 1
 Else
 osh = 16 - protv
otv(k) = 0
End If

If fl1 = True And fl2 = True Then
fl1 = False
fl2 = False
info = ""
End If
If itogo >= 16 Then
fl1 = True
fl2 = True
Form1.Print "всё"
Command3.Enabled = True
Command1.Enabled = False
Command2.Enabled = False
Command6.Enabled = True
List2.Enabled = False

Else
 'Form1.Print sozv(um2(kk))
Form1.Print itogo
List2.Enabled = False
List1.Enabled = True

End If
30 '
End Sub

Private Sub Text1_Change()

End Sub
