VERSION 5.00 Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX" Begin VB.Form frmForm11 Caption = "Дешифратор-кодировщик текста - v1.02" ClientHeight = 4275 ClientLeft = 2115 ClientTop = 3060 ClientWidth = 7320 FillColor = &H80000012& Icon = "Spy_Deshifr.frx":0000 LinkTopic = "Form11" ScaleHeight = 4275 ScaleWidth = 7320 StartUpPosition = 2 'CenterScreen Begin VB.TextBox Text4 Height = 285 Left = 4320 TabIndex = 12 Text = "Text4" Top = 3840 Width = 1455 End Begin VB.TextBox Text3 Height = 285 Left = 2760 TabIndex = 11 Text = "Text3" Top = 3840 Width = 1335 End Begin VB.CommandButton Command6 Caption = "Лат<=>Рус" Height = 495 Left = 5160 TabIndex = 9 Top = 3120 Width = 1575 End Begin VB.CommandButton Command2 Caption = "<<<Помен&ять>>>" Height = 495 Left = 5160 TabIndex = 8 Top = 2640 Width = 1575 End Begin VB.CommandButton Command4 Caption = "П&оказать код шифра" Height = 495 Left = 3600 TabIndex = 7 Top = 3120 Width = 1575 End Begin VB.CommandButton Command3 Caption = "Пок&азать код текста" Height = 495 Left = 2040 TabIndex = 6 Top = 3120 Width = 1575 End Begin MSComDlg.CommonDialog CommonDialog1 Left = 6840 Top = 3360 _ExtentX = 847 _ExtentY = 847 _Version = 393216 End Begin VB.TextBox Text2 Height = 1155 Left = 120 MultiLine = -1 'True ScrollBars = 3 'Both TabIndex = 5 ToolTipText = "Код" Top = 1440 Width = 7095 End Begin VB.TextBox Text1 Height = 1215 Left = 120 MultiLine = -1 'True ScrollBars = 3 'Both TabIndex = 2 Text = "Spy_Deshifr.frx":0442 ToolTipText = "Текст" Top = 240 Width = 7095 End Begin VB.CommandButton Command1 BackColor = &H0000C000& Caption = "Д&ешифрировать" Default = -1 'True Height = 495 Left = 2040 MaskColor = &H80000012& Style = 1 'Graphical TabIndex = 1 ToolTipText = "Для кодировки текста нажмите кнопку ""Интерпретировать""." Top = 2640 Width = 1575 End Begin VB.CommandButton Command5 BackColor = &H008080FF& Cancel = -1 'True Caption = "В&ыход" Height = 495 Left = 3600 MaskColor = &H80000012& Style = 1 'Graphical TabIndex = 0 ToolTipText = "Для завершения работы программы нажмите кнопку ""Выход""." Top = 2640 Width = 1575 End Begin VB.Label Label3 Caption = "The spy" Height = 255 Left = 1440 TabIndex = 10 Top = 3840 Width = 855 End Begin VB.Label Label2 BackColor = &H00FFFF80& Caption = "Введите текст и нажмите кнопку ""Д&ешифрировать""." BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 204 Weight = 700 Underline = 0 'False Italic = -1 'True Strikethrough = 0 'False EndProperty ForeColor = &H00400000& Height = 255 Left = 120 TabIndex = 4 Top = 0 Width = 4935 End Begin VB.Label Label1 BackColor = &H00FFFF80& Caption = "Дешифратор - кодировщик текста. Версия: 1.02" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 204 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00404000& Height = 855 Left = 240 TabIndex = 3 Top = 2760 Width = 1575 End Begin VB.Menu mnuFile Caption = "&Файл" Begin VB.Menu mnuNew Caption = "Созд&ать" Shortcut = ^N End Begin VB.Menu mnuOpen Caption = "&Открыть" Shortcut = ^O End Begin VB.Menu mnuSave Caption = "&Сохранить" Shortcut = ^S End Begin VB.Menu mnuSaveAs Caption = "Сохранить &как" End Begin VB.Menu mnuSeparator1 Caption = "-" End Begin VB.Menu mnuPrint Caption = "&Печать" Shortcut = ^P End Begin VB.Menu mnuProperties Caption = "Сво&йства" End Begin VB.Menu mnuClose Caption = "&Закрыть" End Begin VB.Menu mnuSeparator2 Caption = "-" End Begin VB.Menu mnuExit Caption = "В&ыход" End End Begin VB.Menu mnuEdit Caption = "&Правка" Begin VB.Menu mnuUndo Caption = "&Отменить" Shortcut = ^Z End Begin VB.Menu mnuRedo Caption = "Пов&торить" Shortcut = ^Y End Begin VB.Menu mnuSeparator3 Caption = "-" End Begin VB.Menu mnuCut Caption = "&Вырезать" Shortcut = ^X End Begin VB.Menu mnuCopy Caption = "&Копировать" Shortcut = ^C End Begin VB.Menu mnuPast Caption = "Вст&авить" Shortcut = ^V End Begin VB.Menu mnuDelete Caption = "&Удалить" Shortcut = {DEL} End Begin VB.Menu mnuSelectAll Caption = "Выделить в&сё" Shortcut = ^A End Begin VB.Menu mnuSeparator4 Caption = "-" End Begin VB.Menu mnuFind Caption = "&Найти" Shortcut = ^F End Begin VB.Menu mnuExchange Caption = "&Заменить" Shortcut = ^H End Begin VB.Menu mnuProceed Caption = "&Перейти" Shortcut = {F5} End End Begin VB.Menu mnuView Caption = "&Вид" Begin VB.Menu mnuStatusBarOn Caption = "&Строка состояния" Checked = -1 'True End Begin VB.Menu mnuStatusBarOff Caption = "&Строка состояния" Visible = 0 'False End Begin VB.Menu mnuToolBar Caption = "Панель &инструментов" Checked = -1 'True End Begin VB.Menu mnuSeparator5 Caption = "-" End Begin VB.Menu mnuInAllScreenOn Caption = "Во весь &экран" End Begin VB.Menu mnuInAllScreenOff Caption = "Во весь &экран" Checked = -1 'True Visible = 0 'False End End Begin VB.Menu mnuTools Caption = "С&ервис" Begin VB.Menu mnuOptions Caption = "&Опции" End Begin VB.Menu mnuSetUp Caption = "&Настройка" End Begin VB.Menu mnuParameters Caption = "П&араметры" End End Begin VB.Menu mnuWindow Caption = "&Окно" Begin VB.Menu mnuNewWindow Caption = "&Новое" End Begin VB.Menu mnuArrangeAll Caption = "&Упорядочить всё" End Begin VB.Menu mnuSeparator6 Caption = "-" End Begin VB.Menu mnuNormal Caption = "Нор&мализовать" End Begin VB.Menu mnuMinimize Caption = "&Свернуть" End Begin VB.Menu mnuMaximize Caption = "&Развернуть" End End Begin VB.Menu mnuHelp Caption = "&Справка" Begin VB.Menu mnuContents Caption = "&Содержание" End Begin VB.Menu mnuCombinationsOfPushButtons Caption = "Сочетания &кнопок" End Begin VB.Menu mnuInfo Caption = "&Информация о системе" End Begin VB.Menu mnuAbout Caption = "&О программе" End End End Attribute VB_Name = "frmForm11" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Dim s, n, i As Integer Dim text, code, v, Strfile, Fl As String Dim k() As Integer Dim c() As Integer Private Sub About_Click() Form2.Show End Sub Private Sub Command1_Click() text = Text1.text s = 0 v = "" code = "" If text = "" Then MsgBox "Это значение недопустимо!" & Chr(13) & Chr(10) & " Введите текст!", vbOKOnly + vbExclamation, "Недопустимое значение" n = Len(text) ReDim k(1 To n) As Integer ReDim c(1 To n) As Integer For i = 1 To n k(i) = Asc(Right(text, n - s)) 'преобразование всех знаков исходного текста в 16-ричный код исходного текста s = s + 1 Next For i = 1 To n 'замена 16-ричного кода исходного текста в 16-ричный код закодириванного текста Select Case k(i) Case Is = 48 c(i) = 231 Case Is = 49 c(i) = 232 Case Is = 50 c(i) = 233 Case Is = 51 c(i) = 234 Case Is = 52 c(i) = 235 Case Is = 53 c(i) = 236 Case Is = 54 c(i) = 237 Case Is = 55 c(i) = 238 Case Is = 56 c(i) = 239 Case Is = 57 c(i) = 174 Case Is = 32 c(i) = 175 Case Is = 58 c(i) = 224 Case Is = 59 c(i) = 225 Case Is = 60 c(i) = 226 Case Is = 61 c(i) = 227 Case Is = 62 c(i) = 228 Case Is = 63 c(i) = 229 Case Is = 64 c(i) = 230 Case Is = 65 c(i) = 241 Case Is = 66 c(i) = 166 Case Is = 67 c(i) = 167 Case Is = 68 c(i) = 168 Case Is = 69 c(i) = 169 Case Is = 70 c(i) = 170 Case Is = 71 c(i) = 171 Case Is = 72 c(i) = 172 Case Is = 73 c(i) = 173 Case Is = 74 c(i) = 157 Case Is = 75 c(i) = 158 Case Is = 76 c(i) = 159 Case Is = 77 c(i) = 160 Case Is = 78 c(i) = 161 Case Is = 79 c(i) = 162 Case Is = 80 c(i) = 163 Case Is = 81 c(i) = 164 Case Is = 82 c(i) = 165 Case Is = 83 c(i) = 148 Case Is = 84 c(i) = 149 Case Is = 85 c(i) = 150 Case Is = 86 c(i) = 151 Case Is = 87 c(i) = 152 Case Is = 88 c(i) = 153 Case Is = 89 c(i) = 154 Case Is = 90 c(i) = 155 Case Is = 91 c(i) = 156 Case Is = 92 c(i) = 139 Case Is = 93 c(i) = 140 Case Is = 94 c(i) = 141 Case Is = 95 c(i) = 142 Case Is = 96 c(i) = 143 Case Is = 97 c(i) = 144 Case Is = 98 c(i) = 145 Case Is = 99 c(i) = 146 Case Is = 100 c(i) = 147 Case Is = 101 c(i) = 131 Case Is = 102 c(i) = 132 Case Is = 103 c(i) = 133 Case Is = 104 c(i) = 240 Case Is = 105 c(i) = 134 Case Is = 106 c(i) = 135 Case Is = 107 c(i) = 136 Case Is = 108 c(i) = 137 Case Is = 109 c(i) = 138 Case Is = 110 c(i) = 42 Case Is = 111 c(i) = 43 Case Is = 112 c(i) = 44 Case Is = 113 c(i) = 45 Case Is = 114 c(i) = 46 Case Is = 115 c(i) = 47 Case Is = 116 c(i) = 128 Case Is = 117 c(i) = 129 Case Is = 118 c(i) = 130 Case Is = 119 c(i) = 33 Case Is = 120 c(i) = 34 Case Is = 121 c(i) = 35 Case Is = 122 c(i) = 36 Case Is = 123 c(i) = 37 Case Is = 124 c(i) = 38 Case Is = 125 c(i) = 39 Case Is = 126 c(i) = 40 Case Is = 127 c(i) = 41 '------------- Case Is = 33 c(i) = 119 Case Is = 34 c(i) = 120 Case Is = 35 c(i) = 121 Case Is = 36 c(i) = 122 Case Is = 37 c(i) = 123 Case Is = 38 c(i) = 124 Case Is = 39 c(i) = 125 Case Is = 40 c(i) = 126 Case Is = 41 c(i) = 127 Case Is = 42 c(i) = 110 Case Is = 43 c(i) = 111 Case Is = 44 c(i) = 112 Case Is = 45 c(i) = 113 Case Is = 46 c(i) = 114 Case Is = 47 c(i) = 115 Case Is = 128 c(i) = 116 Case Is = 129 c(i) = 117 Case Is = 130 c(i) = 118 Case Is = 131 c(i) = 101 Case Is = 132 c(i) = 102 Case Is = 133 c(i) = 103 Case Is = 240 c(i) = 104 Case Is = 134 c(i) = 105 Case Is = 135 c(i) = 106 Case Is = 136 c(i) = 107 Case Is = 137 c(i) = 108 Case Is = 138 c(i) = 109 Case Is = 139 c(i) = 92 Case Is = 140 c(i) = 93 Case Is = 141 c(i) = 94 Case Is = 142 c(i) = 95 Case Is = 143 c(i) = 96 Case Is = 144 c(i) = 97 Case Is = 145 c(i) = 98 Case Is = 146 c(i) = 99 Case Is = 147 c(i) = 100 Case Is = 148 c(i) = 83 Case Is = 149 c(i) = 84 Case Is = 150 c(i) = 85 Case Is = 151 c(i) = 86 Case Is = 152 c(i) = 87 Case Is = 153 c(i) = 88 Case Is = 154 c(i) = 89 Case Is = 155 c(i) = 90 Case Is = 156 c(i) = 91 Case Is = 157 c(i) = 74 Case Is = 158 c(i) = 75 Case Is = 159 c(i) = 76 Case Is = 160 c(i) = 77 Case Is = 161 c(i) = 78 Case Is = 162 c(i) = 79 Case Is = 163 c(i) = 80 Case Is = 164 c(i) = 81 Case Is = 165 c(i) = 82 Case Is = 241 c(i) = 65 Case Is = 166 c(i) = 66 Case Is = 167 c(i) = 67 Case Is = 168 c(i) = 68 Case Is = 169 c(i) = 69 Case Is = 170 c(i) = 70 Case Is = 171 c(i) = 71 Case Is = 172 c(i) = 72 Case Is = 173 c(i) = 73 Case Is = 174 c(i) = 57 Case Is = 175 c(i) = 32 Case Is = 224 c(i) = 58 Case Is = 225 c(i) = 59 Case Is = 226 c(i) = 60 Case Is = 227 c(i) = 61 Case Is = 228 c(i) = 62 Case Is = 229 c(i) = 63 Case Is = 230 c(i) = 64 Case Is = 231 c(i) = 48 Case Is = 232 c(i) = 49 Case Is = 233 c(i) = 50 Case Is = 234 c(i) = 51 Case Is = 235 c(i) = 52 Case Is = 236 c(i) = 53 Case Is = 237 c(i) = 54 Case Is = 238 c(i) = 55 Case Is = 239 c(i) = 56 '------------ Case Is = 1 c(i) = 255 Case Is = 2 c(i) = 31 Case Is = 3 c(i) = 30 Case Is = 4 c(i) = 29 Case Is = 5 c(i) = 28 Case Is = 6 c(i) = 27 Case Is = 7 c(i) = 26 Case Is = 8 c(i) = 25 Case Is = 9 c(i) = 24 Case Is = 10 c(i) = 23 Case Is = 11 c(i) = 22 Case Is = 12 c(i) = 21 Case Is = 13 c(i) = 20 Case Is = 14 c(i) = 19 Case Is = 15 c(i) = 18 Case Is = 16 c(i) = 17 Case Is = 17 c(i) = 16 Case Is = 18 c(i) = 15 Case Is = 19 c(i) = 14 Case Is = 20 c(i) = 13 Case Is = 21 c(i) = 12 Case Is = 22 c(i) = 11 Case Is = 23 c(i) = 10 Case Is = 24 c(i) = 9 Case Is = 25 c(i) = 8 Case Is = 26 c(i) = 7 Case Is = 27 c(i) = 6 Case Is = 28 c(i) = 5 Case Is = 29 c(i) = 4 Case Is = 30 c(i) = 3 Case Is = 31 c(i) = 2 Case Is = 255 c(i) = 1 Case Else c(i) = k(i) End Select Next For i = 1 To n v = Chr(c(i)) 'преобразование 16-ричного кода закодированного текста в знаки закодированного текста code = code & v Next Text2.text = code End Sub Private Sub Command5_Click() End End Sub Private Sub Command3_Click() text = Text1.text 'Присвоение переменной text значения всех символов, содержащихся в активной форме в первом текстовом окне s = 1 'Присвоение начального значения счётчику замен символов исходного текста в 16-ричный код v = "" code = "" If text = "" Then MsgBox "Это значение недопустимо!" & Chr(13) & Chr(10) & " Введите текст!", vbOKOnly + vbExclamation, "Недопустимое значение" n = Len(text) ReDim k(1 To n) As Integer ReDim c(1 To n) As Integer For i = 1 To n k(i) = Asc(Mid(text, s, 1)) 'преобразование всех знаков исходного текста в 16-ричный код исходного текста 'Функция Mid(String, Start As Long, [Length]) вырезает из строковой переменной text один символ, начиная с позиции s (s=1 - начальное значение) 'Функция Asc(String As String) определяет 16-ричный код первого символа в строке If s = n Then s = s Else s = s + 1 v = k(i) code = code & v & " " Next Text2.text = code Text3 = s Text4 = n 'For i = 1 To n 'k(i) = Asc(Right(text, n - s)) 'преобразование всех знаков исходного текста в 16-ричный код исходного текста 's = s + 1 'v = k(i) 'code = code & v & " " 'Next 'Text2.text = code End Sub Private Sub Command4_Click() text = Text1.text 'Присвоение переменной text значения всех символов, содержащихся в активной форме в первом текстовом окне s = 1 'Присвоение начального значения счётчику замен символов исходного текста в 16-ричный код v = "" code = "" If text = "" Then MsgBox "Это значение недопустимо!" & Chr(13) & Chr(10) & " Введите текст!", vbOKOnly + vbExclamation, "Недопустимое значение" n = Len(text) ReDim k(1 To n) As Integer ReDim c(1 To n) As Integer For i = 1 To n c(i) = Asc(Right(text, n - s)) 'преобразование всех знаков закодированного текста в 16-ричный код закодированного текста s = s + 1 v = c(i) code = code & v & " " Next Text2.text = code End Sub Private Sub Command2_Click() text = Text1.text Text1.text = Text2.text Text2.text = text End Sub Private Sub Exit_Click() End End Sub 'Pleer.DeviceType = "WaveAudio" '"Sequencer" ' 'Pleer.FileName = "D:\Music\Mid\MoonliteSonata.mid" 'Pleer.Command = "Open" 'Pleer.Command = "Play" Private Sub Form_Load() CommonDialog1.Filter = "Текст ( *.txt ) | *.txt" End Sub Private Sub Info_Click() Form3.Show End Sub Private Sub mnuOpen_Click() Text1 = "" CommonDialog1.ShowOpen Fl = CommonDialog1.FileName Open Fl For Input As #1 Do While Not EOF(1) Line Input #1, Strfile Text1.text = Text1.text & Strfile & Chr(13) & Chr(10) Loop Close #1 End Sub Private Sub Text1_DblClick() Text1 = "" End Sub Private Sub Text2_DblClick() Text2 = "" End Sub