VERSION 5.00 Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX" Begin VB.Form Form1 BorderStyle = 4 'Fixed ToolWindow Caption = "Настройка Путей к файлам Справки" ClientHeight = 4215 ClientLeft = 45 ClientTop = 285 ClientWidth = 7575 Icon = "find.frx":0000 LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 4215 ScaleWidth = 7575 StartUpPosition = 3 'Windows Default Begin VB.CommandButton Command4 Caption = "Cancel" Height = 375 Left = 6000 TabIndex = 10 Top = 3720 Width = 1455 End Begin VB.CommandButton Command1 Caption = "Обзор..." Height = 255 Left = 6600 TabIndex = 9 Top = 3360 Width = 855 End Begin MSComDlg.CommonDialog CommonDialog1 Left = 6120 Top = 3120 _ExtentX = 847 _ExtentY = 847 _Version = 393216 DialogTitle = "Поиск файла конфигурации" FileName = "help.pth" Filter = "help.pth|help.pth" InitDir = "files" End Begin VB.TextBox Text1 Height = 285 Left = 120 Locked = -1 'True TabIndex = 8 Text = "C:\Студент\ТКС-107\Удинские\КР\Высшая Истина\files\help.pth" Top = 3360 Width = 6495 End Begin MSComDlg.CommonDialog CommonDialog4 Left = 6120 Top = 2280 _ExtentX = 847 _ExtentY = 847 _Version = 393216 DialogTitle = "Поиск файла Справки" Filter = "help.htm|help.htm" End Begin VB.CommandButton Command6 Caption = "Обзор..." Height = 255 Left = 6600 TabIndex = 6 Top = 2520 Width = 855 End Begin VB.TextBox Text4 Height = 285 Left = 120 Locked = -1 'True TabIndex = 5 Text = "C:\Студент\ТКС-107\Удинские\КР\Высшая Истина\files\help.htm" Top = 2520 Width = 6495 End Begin VB.CommandButton Command3 Caption = "OK" Height = 375 Left = 4440 TabIndex = 3 Top = 3720 Width = 1455 End Begin MSComDlg.CommonDialog CommonDialog2 Left = 6120 Tag = "0" Top = 1440 _ExtentX = 847 _ExtentY = 847 _Version = 393216 DialogTitle = "Поиск MicroSoft Word" Filter = "WINWORD.EXE|WINWORD.EXE" End Begin VB.CommandButton Command2 Caption = "Обзор..." Height = 255 Left = 6600 TabIndex = 1 Top = 1680 Width = 855 End Begin VB.TextBox Text2 Height = 285 Left = 120 Locked = -1 'True TabIndex = 0 Text = "C:\Program Files\Microsoft Office\Office10\WINWORD.EXE" Top = 1680 Width = 6495 End Begin VB.Label Label1 Caption = "Путь к файлу конфигурации" Height = 255 Left = 120 TabIndex = 11 Top = 3120 Width = 7335 End Begin VB.Label Label5 Caption = "Путь к Справке" Height = 255 Left = 120 TabIndex = 7 Top = 2280 Width = 7335 End Begin VB.Label Label3 Caption = $"find.frx":0442 Height = 1215 Left = 120 TabIndex = 4 Top = 120 Width = 7335 End Begin VB.Label Label2 Caption = "Путь к Word" Height = 255 Left = 120 TabIndex = 2 Top = 1440 Width = 7335 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Dim k As Integer Dim s Private Sub Command1_Click() CommonDialog1.FileName = Text1 CommonDialog1.ShowOpen If Dir(CommonDialog1.FileName) = "help.pth" Then Text1 = CommonDialog1.FileName Else s = MsgBox("Файл сохранения не найден" & Chr(10) & Chr(13) & "Продолжаем искать", vbOKCancel, "Поиск файла конфигурации") If s = vbOK Then Command1_Click End If End If End Sub Private Sub Command2_Click() CommonDialog2.FileName = Text2 CommonDialog2.ShowOpen If Dir(CommonDialog2.FileName) = "WINWORD.EXE" Then Text2 = CommonDialog2.FileName ElseIf MsgBox("Word не найден" & Chr(10) & Chr(13) & "Продолжаем искать?", vbYesNo, "Поиск Microsoft Word") = vbYes Then Command2_Click End If End Sub Private Sub Command3_Click() Open Text1 For Output As #1 If Dir(Text2) = "WINWORD.EXE" Then Print #1, Text4 v = Chr(34) & Text2 & Chr(34) & " files\full.doc" Print #3, v Else MsgBox "Путь к файлу справки указан неверно Справка не работает", , "Ошибка" Print #1, "" End If Close Open Text1 For Append As #1 If Dir(Text4) = "help.htm" Then Print #1, Text2 Else MsgBox "Путь к Microsoft Word указан неверно Подробный отчет не работает", , "Ошибка" Print #1, "" End If Close Unload Me End Sub Private Sub Command4_Click() Unload Me End Sub Private Sub Command6_Click() CommonDialog4.FileName = Text4 CommonDialog4.ShowOpen If Dir(CommonDialog4.FileName) = "help.htm" Then Text4 = CommonDialog4.FileName ElseIf MsgBox("Word не найден" & Chr(10) & Chr(13) & "Продолжаем искать?", vbYesNo, "Поиск Microsoft Word") = vbYes Then Command6_Click End If End Sub Private Sub Form_Load() Command1_Click If s = vbCancel Then End Open "full.bat" For Output As #3 Open "help.pth" For Append As #1 Print #1, "" Close #1 Open "help.pth" For Input As #1 Line Input #1, strlist If strlist <> "" Then Text4 = strlist End If Close #1 Open "help.pth" For Append As #1 Print #1, "" Close #1 Open "help.pth" For Input As #1 Line Input #1, strlist Line Input #1, strlist If strlist <> "" Then Text2 = strlist End If Close #1 k = 1 End Sub Private Sub Text3_KeyPress(KeyAscii As Integer) Text3 = KeyAscii End Sub