VERSION 5.00
Begin VB.Form frm1 
   BackColor       =   &H00004040&
   Caption         =   "Шифровка и дешифровка"
   ClientHeight    =   4140
   ClientLeft      =   4032
   ClientTop       =   2724
   ClientWidth     =   4020
   LinkTopic       =   "Form1"
   ScaleHeight     =   4140
   ScaleWidth      =   4020
   Begin VB.TextBox txtDecod 
      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            =   360
      TabIndex        =   6
      Top             =   2640
      Width           =   3255
   End
   Begin VB.CommandButton cmdDecod 
      Caption         =   "Расшифровать"
      Height          =   495
      Left            =   2280
      TabIndex        =   5
      Top             =   3480
      Width           =   1575
   End
   Begin VB.TextBox txtCod 
      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            =   360
      TabIndex        =   2
      Top             =   1560
      Width           =   3255
   End
   Begin VB.TextBox txtSecrtext 
      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            =   360
      TabIndex        =   1
      Top             =   480
      Width           =   3255
   End
   Begin VB.CommandButton cmdCod 
      Caption         =   "Зашифровать"
      Height          =   495
      Left            =   120
      TabIndex        =   0
      Top             =   3480
      Width           =   1455
   End
   Begin VB.Label lbl3 
      Alignment       =   2  'Center
      Caption         =   "Расшифрованный текст"
      Height          =   255
      Left            =   480
      TabIndex        =   7
      Top             =   2280
      Width           =   3015
   End
   Begin VB.Label lbl2 
      Alignment       =   2  'Center
      Caption         =   "Зашифрованный текст"
      Height          =   255
      Left            =   480
      TabIndex        =   4
      Top             =   1200
      Width           =   3015
   End
   Begin VB.Label lbl1 
      Alignment       =   2  'Center
      Caption         =   "Секретный текст"
      Height          =   255
      Left            =   480
      TabIndex        =   3
      Top             =   120
      Width           =   3015
   End
End
Attribute VB_Name = "frm1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim bytI, bytJ, bytZ(1 To 200) As Byte, strKF, strA, strB As String
Private Sub cmdCod_Click()
strKF = "электронно-вычислительные машины, компьютеры (железо)позволяют находить значения функций, а ещё свойства готовых объектов"
For bytI = 1 To Len(txtSecrtext.Text)
strA = Mid$(txtSecrtext.Text, bytI, 1)
For bytJ = 1 To Len(strKF)
If Mid$(strKF, bytJ, 1) = strA Then bytZ(bytI) = bytJ: bytJ = Len(strKF) + 1
Next bytJ
txtCod.Text = txtCod.Text + Str(bytZ(bytI))
Next bytI
End Sub
Private Sub cmdDecod_Click()
For bytI = 1 To Len(txtSecrtext.Text)
strB = Mid$(strKF, bytZ(bytI), 1)
txtDecod.Text = txtDecod.Text + strB
Next bytI
End Sub
