VERSION 5.00 Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX" Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX" Begin VB.Form Form2 Caption = "Information" ClientHeight = 3105 ClientLeft = 165 ClientTop = 735 ClientWidth = 7515 LinkTopic = "Form2" ScaleHeight = 3105 ScaleWidth = 7515 StartUpPosition = 3 'Windows Default Begin MSComDlg.CommonDialog CommonDialog1 Left = 6960 Top = 2160 _ExtentX = 847 _ExtentY = 847 _Version = 393216 End Begin ComctlLib.StatusBar StatusBar1 Align = 2 'Align Bottom Height = 255 Left = 0 TabIndex = 0 Top = 2850 Width = 7515 _ExtentX = 13256 _ExtentY = 450 SimpleText = "" _Version = 327682 BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7} NumPanels = 1 BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7} TextSave = "" Key = "" Object.Tag = "" EndProperty EndProperty 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 mnuClose 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 mnuSeparator2 Caption = "-" End Begin VB.Menu mnuWindowsList Caption = "Список окон" WindowList = -1 'True End Begin VB.Menu mnuSeparator3 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 mnuSeparator4 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 mnuSeparator5 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 mnuSeparator6 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 mnuFontOfText Caption = "Шрифт текста" End Begin VB.Menu mnuRegister Caption = "Регистр" Begin VB.Menu mnuAsInTheSentences Caption = "Как в &предложениях" End Begin VB.Menu mnuAllLowerCase Caption = "вс&е строчные" End Begin VB.Menu mnuAllCapital Caption = "&ВСЕ ПРОПИСНЫЕ" End Begin VB.Menu mnuBeginWithCapital Caption = "&Начинать С Прописных" End Begin VB.Menu mnuСhangeRegister Caption = "иЗ&МЕНИТЬ РЕГИСТР" End End Begin VB.Menu mnuSetUp Caption = "&Настройка" End Begin VB.Menu mnuParameters Caption = "П&араметры" End End Begin VB.Menu mnuWindow Caption = "&Окно" Begin VB.Menu mnuDivide Caption = "Разделить..." Begin VB.Menu mnuOnHorizontal Caption = "по горизонтали" Checked = -1 'True End Begin VB.Menu mnuOnVertical Caption = "по вертикали" End End Begin VB.Menu mnuClear Caption = "Очистить..." Begin VB.Menu mnuWindowOfTheText Caption = "Окно текста" End Begin VB.Menu mnuWindowOfTheCode Caption = "Окно кода" End Begin VB.Menu mnuSeparator7 Caption = "-" End Begin VB.Menu mnuAllWindows Caption = "Все окна" End End Begin VB.Menu mnuSeparator8 Caption = "-" End Begin VB.Menu mnuNewWindow Caption = "&Новое" End Begin VB.Menu mnuArrangeAll Caption = "&Упорядочить всё" End Begin VB.Menu mnuSeparator9 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 mnuSysInfo Caption = "&Информация о системе" End Begin VB.Menu mnuAbout Caption = "&О программе" End End End Attribute VB_Name = "Form2" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Dim i As Integer Dim File As String 'Объявление переменной для запоминания имён файлов в CommonDialog 'Public FlSv As Boolean 'Объявление переменной для учёта сохранения файлов\окон Dim NewDocument As New frmForm1 'Переменная NewDocument объявлена как форма frmForm1 Private Sub Form_Load() Height = 4800 Width = 7350 mnuStatusBarOn.Visible = True mnuStatusBarOn.Checked = True mnuStatusBarOff.Visible = False mnuStatusBarOff.Checked = False StatusBar1.Visible = True mnuInAllScreenOn.Visible = True mnuInAllScreenOn.Checked = False mnuInAllScreenOff.Visible = False mnuInAllScreenOff.Checked = True mnuNormal.Checked = True mnuMinimize.Checked = False mnuMaximize.Checked = False WindowState = 0 mnuOnHorizontal.Checked = True mnuOnHorizontal.Visible = True mnuOnVertical.Checked = False mnuOnVertical.Visible = True mnuWindowsList.Enabled = False 'При загрузке приложения меню "Список окон" не доступно 'mnuWindowsList.Caption = "(Пусто)" 'и в нём отображается значение "(Пусто)" CommonDialog1.Filter = "Текстовые файлы (*.txt)|*.txt|Текст в формате RTF (*.rtf)|(*.rtf)|Документ Microsoft Word 2000 (*.doc)|(*.doc)|Все файлы (*.*)|*.*" End Sub Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 2 Then PopupMenu mnuFile End Sub Private Sub mnuAllWindows_Click() ActiveForm.RichTextBox1.Text = "" ActiveForm.RichTextBox2.Text = "" End Sub Private Sub mnuClose_Click() 'frmMainMDI.ActiveForm.Hide 'Скрыть активное(-ую) окно\форму End Sub Private Sub mnuContents_Click() If Dir("readme.doc") = "readme.doc" Then 'Файл "readme.doc" присутствует Start = Shell("C:\Progra~1\Micros~1\Office\Winword.exe readme.doc", vbMaximizedFocus) 'Start = Shell("Winword.exe readme.doc", vbMaximizedFocus) Else 'Файл "readme.doc" отсутствует MsgBox "Файл " & Chr(34) & "intro.exe" & Chr(34) & " не найден.", vbCritical, "Ошибка №53" Exit Sub End If End Sub Private Sub mnuCopy_Click() 'Clipboard.SetText frmMainMDI.ActiveForm.RichTextBox1.SelText 'Clipboard.SetText frmMainMDI.ActiveForm.RichTextBox2.SelText End Sub Private Sub mnuExit_Click() End End Sub Private Sub mnuNew_Click() NewDocument.Show 'Создание нового документа из формы frmForm1 m = m + 1 'Заголовок окон можно изменить здесь или при загрузке подчиненной формы End Sub Private Sub mnuOpen_Click() FileNumber = FreeFile On Error GoTo HandlerErr With CommonDialog1 .FileName = "*.txt" .Flags = cdlOFNHideReadOnly .ShowOpen End With NewDocument.Show m = m + 1 File = CommonDialog1.FileName frmMainMDI.ActiveForm.RichTextBox1.LoadFile File, rtfRTF 'Open File For Input As FileNumber 'frmMainMDI.ActiveForm.RichTextBox1.TextRTF = Input(LOF(FileNumber), FileNumber) 'Заголовок окон можно изменить здесь или при загрузке подчиненной формы 'frmMainMDI.ActiveForm.Caption = CommonDialog1.FileName '& CStr(m) 'Close Exit Sub HandlerErr: MsgBox "Ошибка " & Str$(Err.Number) & " при чтении." & vbCrLf & Err.Description ''Открытие любого текстового файла 'CommonDialog1.ShowOpen 'File = CommonDialog1.FileName 'Open File For Input As #1 'Do While Not EOF(1) 'Line Input #1, Strfile 'Loop 'Close #1 End Sub Private Sub mnuInAllScreenOff_Click() mnuInAllScreenOn.Visible = True mnuNormal.Checked = True mnuMinimize.Checked = False mnuMaximize.Checked = False WindowState = 0 mnuInAllScreenOff.Visible = False End Sub Private Sub mnuInAllScreenOn_Click() mnuInAllScreenOff.Visible = True mnuMaximize.Checked = True mnuNormal.Checked = False mnuMinimize.Checked = False WindowState = 2 mnuInAllScreenOn.Visible = False End Sub Private Sub mnuMaximize_Click() mnuInAllScreenOff.Visible = True mnuInAllScreenOn.Visible = False mnuMaximize.Checked = True mnuNormal.Checked = False mnuMinimize.Checked = False WindowState = 2 End Sub Private Sub mnuMinimize_Click() WindowState = 1 End Sub Private Sub mnuNormal_Click() mnuInAllScreenOn.Visible = True mnuInAllScreenOff.Visible = False mnuNormal.Checked = True mnuMinimize.Checked = False mnuMaximize.Checked = False WindowState = 0 End Sub Private Sub mnuPast_Click() 'frmMainMDI.ActiveForm.RichTextBox1.SelText = Clipboard.GetText 'frmMainMDI.ActiveForm.RichTextBox2.SelText = Clipboard.GetText End Sub Private Sub mnuSave_Click() FileNumber = FreeFile On Error GoTo HandlerErr CommonDialog1.ShowSave File = CommonDialog1.FileName Open File For Output As FileNumber Print #FileNumber, frmMainMDI.ActiveForm.RichTextBox1.TextRTF Print #FileNumber, "--- --- ---" 'vbCrLf Print #FileNumber, frmMainMDI.ActiveForm.RichTextBox2.TextRTF Close Exit Sub HandlerErr: MsgBox "Ошибка " & Str$(Err.Number) & "при записи." & vbCrLf & Err.Description End Sub Private Sub mnuStatusBarOff_Click() mnuStatusBarOn.Visible = True StatusBar1.Visible = True mnuStatusBarOff.Visible = False End Sub Private Sub mnuStatusBarOn_Click() mnuStatusBarOff.Visible = True StatusBar1.Visible = False mnuStatusBarOn.Visible = False End Sub Private Sub mnuSysInfo_Click() Call frmAbout.StartSysInfo End Sub Private Sub mnuWindowOfTheCode_Click() ActiveForm.RichTextBox2.Text = "" End Sub Private Sub mnuWindowOfTheText_Click() ActiveForm.RichTextBox1.Text = "" End Sub Private Sub mnuOnVertical_Click() mnuOnVertical.Checked = True mnuOnHorizontal.Checked = False 'frmMainMDI.ActiveForm.ResizeForm 'Height = 4800 + 15 'Width = 7350 + 15 'Height = 4800 - 15 'Width = 7350 - 15 End Sub