VERSION 5.00
Begin VB.Form frm1 
   BackColor       =   &H00FF8080&
   Caption         =   "Словарь компьютерных терминов"
   ClientHeight    =   4335
   ClientLeft      =   2565
   ClientTop       =   2520
   ClientWidth     =   7260
   LinkTopic       =   "Form1"
   ScaleHeight     =   4335
   ScaleWidth      =   7260
   Begin VB.CommandButton cmdSave 
      Caption         =   "Сохранить в файле"
      Height          =   495
      Left            =   120
      TabIndex        =   7
      Top             =   3600
      Width           =   1695
   End
   Begin VB.CommandButton cmdRez 
      Caption         =   "Показать"
      Height          =   495
      Left            =   120
      TabIndex        =   6
      Top             =   2880
      Width           =   1695
   End
   Begin VB.ListBox lstSort 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   2160
      ItemData        =   "frm1.frx":0000
      Left            =   4680
      List            =   "frm1.frx":0002
      TabIndex        =   5
      Top             =   720
      Width           =   2175
   End
   Begin VB.CommandButton cmdSort 
      Caption         =   "Сортировать"
      Height          =   495
      Left            =   120
      TabIndex        =   4
      Top             =   2160
      Width           =   1695
   End
   Begin VB.ListBox lstTerm 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   2160
      ItemData        =   "frm1.frx":0004
      Left            =   2280
      List            =   "frm1.frx":0006
      TabIndex        =   3
      Top             =   720
      Width           =   2175
   End
   Begin VB.CommandButton cmdTerm 
      Caption         =   "Считать термины"
      Height          =   495
      Left            =   120
      TabIndex        =   2
      Top             =   1440
      Width           =   1695
   End
   Begin VB.TextBox txtAlph 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   120
      TabIndex        =   1
      Top             =   120
      Width           =   5295
   End
   Begin VB.CommandButton cmdAlph 
      Caption         =   "Считать алфавит"
      Height          =   495
      Left            =   120
      TabIndex        =   0
      Top             =   720
      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 As Byte, strA(1 To 33), strB(1 To 10), strC(1 To 10) As String
Private Sub cmdAlph_Click()
Open "E:\practicum\VB\Projects\project4\alphabet.txt" For Input As #1
For bytI = 1 To 33
Input #1, strA(bytI)
txtAlph.Text = txtAlph.Text + strA(bytI)
Next bytI
Close #1
End Sub
Private Sub cmdTerm_Click()
Open "E:\practicum\VB\Projects\project4\term.txt" For Input As #2
bytI = 1
Do Until EOF(2)
Input #2, strB(bytI)
lstTerm.AddItem strB(bytI)
bytI = bytI + 1
Loop
Close #2
End Sub
Private Sub cmdSort_Click()
bytJ = 1
For bytK = 1 To 33
For bytI = 1 To 10
If strA(bytK) = Left$(strB(bytI), 1) Then strC(bytJ) = strB(bytI): bytJ = bytJ + 1
Next bytI
Next bytK
End Sub
Private Sub cmdRez_Click()
For bytJ = 1 To 10
lstSort.AddItem strC(bytJ)
Next bytJ
End Sub
Private Sub cmdSave_Click()
Open "E:\practicum\VB\Projects\Z5_15\sort.txt" For Output As #3
For bytI = 1 To 10
Write #3, strC(bytI)
Next bytI
Close #3
End Sub

