Список использованных источников. 2. Ляхович В.Ф. Основы информатики




1. Майкл Хальворсон Visual Basic.NET: Шаг за шагом/ Майкл Хальворсон - Москва: СП ЭКОМ, 2004 - 672 с.

2. Ляхович В.Ф. Основы информатики

3. Рудаков А.В., Технология разработки программных продуктов: Учебное пособие для студентов среднего профессионального образования. - М.: Издательский цент «Академия», 2005г. - 208с.

4. Культин Н. «Visual Basic: Освой на примерах », Санкт - Петербург, 2004г. - 325с.

5. Разработка Windows приложений на Microsoft Visual Basic.NET и Microsoft Visual C#.NET. Учебный курс MCAD/MCSD/ Пер. с англ. - М.: "Русская редакция", 2003 - 512 с.

. Джеймс Фокселл Освой самостоятельно Visual Basic.NET за 24 часа/ Джеймс Фокселл - Москва: Вильямс, 2002 - 416 с.

7. Интернет - ресурс www 5balov.ru.

8. Литвиненко Т.В Visual Basic 6.: учебное пособие для студентов вузов.

. Симонович С.,Евсеев Г., Алексеев А. Специальная информатика. Практическая информатика. Учебное пособие.

10. Рамбо Дж., Якобсон А., Буч Г., UML: специальный справочник. - СПб.: Питер, 2002.-656 с.: ил.

 


Приложение

Программный код

Imports System.Drawing.PrintingClass Form1data As IDataObject = Clipboard.GetDataObject()PrintPageSettings As New PageSettingsStringToPrint As StringPrintFont As New Font("Arial", 10)numChars As IntegernumLines As IntegerstringForPage As Stringrez As MsgBoxResultSub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosingk = True Then= MsgBox("Сохранить изменеия файла " & Me.Text & "?", vbQuestion + vbYesNoCancel)rez = MsgBoxResult.Yes Theni = 0 Then.FileName = Me.TextSaveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then+= 1(i, SaveFileDialog1.FileName, OpenMode.Output)(i, RichTextBox1.Text)ex As Exception("Ошибка открытия файла", MsgBoxStyle.Critical)(i)Try.Cancel = TrueIfi <> 0 Then(i, MyNameFile, OpenMode.Output)(i, RichTextBox1.Text)(i)Ifrez = MsgBoxResult.Cancel Then.Cancel = TrueIfIfSubSub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load.OpenFileDialog1.Filter = "Файлы RTF(*.rtf)|*rtf|Текстовые документы(*.txt)|*.txt|Документ Word для Windows(*.doc)|*.doc|Windows Write(*.wri)|*.wri|Текстовые документы MS-DOS(*.txt)|*.txt|Текстовый документ в Юникоде(*.txt)|txt|Все документы(*.*)|*.*".SaveFileDialog1.Filter = "Файлы RTF(*.rtf)|*rtf|Текстовые документы(*.txt)|*.txt|Текстовый документ в Юникоде(*.txt)|txt".Text = "Document".WordWrap = True= 0: k = Falsedata As IDataObject = Clipboard.GetDataObject()

НайтиДалееToolStripMenuItem.Enabled = FalseSubSub ВыходToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ВыходToolStripMenuItem.Clickk = True Then= MsgBox("Сохранить изменеия файла " & Me.Text & "?", vbQuestion + vbYesNoCancel)rez = MsgBoxResult.Yes Theni = 0 Then.FileName = Me.TextSaveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then+= 1(i, SaveFileDialog1.FileName, OpenMode.Output)(i, RichTextBox1.Text)ex As Exception("Ошибка открытия файла", MsgBoxStyle.Critical)(i)TrySubIfi <> 0 Then(i, MyNameFile, OpenMode.Output)(i, RichTextBox1.Text)(i)Ifrez = MsgBoxResult.Cancel ThenSubrez = MsgBoxResult.No ThenIfIfSub

Sub RichTextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs)= TrueSub

Sub ОткрытьToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ОткрытьToolStripMenuItem.Clickk = False Then Otkr()k = True Then= MsgBox("Сохранить изменеия файла " & Me.Text & "?", vbQuestion + vbYesNoCancel)rez = MsgBoxResult.Yes Theni = 0 Then.FileName = Me.TextSaveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then+= 1(i, SaveFileDialog1.FileName, OpenMode.Output)(i, RichTextBox1.Text)ex As Exception("Ошибка открытия файла", MsgBoxStyle.Critical)(i)TryIfi <> 0 Then(i, MyNameFile, OpenMode.Output)(i, RichTextBox1.Text)(i)If()rez = MsgBoxResult.No Then()IfIfSub

Sub СохранитьToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles СохранитьToolStripMenuItem.Click()Sub

Sub СохранитьКакToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles СохранитьКакToolStripMenuItem.Click.SaveFileDialog1.Filter = "Файлы RTF(*.rtf)|*rtf|Текстовые документы(*.txt)|*.txt|Текстовый документ в Юникоде(*.txt)|txt".FileName = Me.TextSaveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then

+= 1= SaveFileDialog1.FileName.Text = ""= Len(MyNameFile)Until Mid(MyNameFile, m, 1) = "\".Text = Mid(MyNameFile, m, 1) + Me.Text= m - 1

(i, SaveFileDialog1.FileName, OpenMode.Output)(i, RichTextBox1.Text)ex As Exception("Ошибка открытия файла", MsgBoxStyle.Critical)(i)TryIfSubSub ОПрограммеToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ОПрограммеToolStripMenuItem.Click.ShowDialog()Sub

Sub ПанельИнструментовToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ПанельИнструментовToolStripMenuItem.ClickПанельИнструментовToolStripMenuItem.CheckState = CheckState.Checked Then.Visible = TrueПанельИнструментовToolStripMenuItem.CheckState = CheckState.Unchecked Then.Visible = FalseIfSub

Sub ШрифтToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ШрифтToolStripMenuItem.ClickFontDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then.SelectionFont = FontDialog1.Font.SelectionColor = FontDialog1.ColorIf= TrueSub

Sub ПечатьToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ПечатьToolStripMenuItem.Click.DefaultPageSettings = PrintPageSettings= RichTextBox1.Text.Document = PrintDocument1result As DialogResult = PrintDialog1.ShowDialogresult = Windows.Forms.DialogResult.OK Then.Print()Ifex As Exception.Show(ex.Message)TrySub

Sub ПредварительныйПросмотрToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ПредварительныйПросмотрToolStripMenuItem.Click

'Указываем текущие параметры страницы.DefaultPageSettings = PrintPageSettings

'Указываем документ для диалогового окна предварительного просмотра

'и показываем его= RichTextBox1.Text.Document = PrintDocument1.ShowDialog()ex As Exception

'Отображаем сообщение об ошибке.Show(ex.Message)TrySubSub ВырезатьToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ВырезатьToolStripMenuItem.Click.SetDataObject(RichTextBox1.SelectedText).SelectedText = ""= TrueSub

Sub КопироватьToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles КопироватьToolStripMenuItem.Click.SetDataObject(RichTextBox1.SelectedText)Sub

Sub ВсToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ВсToolStripMenuItem.Click(data.GetDataPresent(DataFormats.Text)) ThenRichTextBox1.SelectedText = "" Then.Text = RichTextBox1.Text + " " + data.GetData(DataFormats.Text).ToString()RichTextBox1.SelectedText <> "" Then.SelectedText = data.GetData(DataFormats.Text).ToString()IfIf= TrueSub

Sub МаркерToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles МаркерToolStripMenuItem.Click.Text = RichTextBox1.Text + Chr(149) + " "= TrueSub

Sub ДатаИВремяToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ДатаИВремяToolStripMenuItem.Click.ShowDialog()Form5.DialogResult = Windows.Forms.DialogResult.OK ThenRichTextBox1.SelectedText = "" Then.Text = RichTextBox1.Text + Form5.ListBox1.SelectedItem

RichTextBox1.SelectedText <> "" Then.SelectedText = Form5.ListBox1.SelectedItem.Close()IfIf= TrueSub

Sub ВызовСправкиToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ВызовСправкиToolStripMenuItem.Click.ShowDialog()Sub

Sub OpenToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenToolStripButton.Clickk = False Then Otkr()k = True Then= MsgBox("Сохранить изменеия файла " & Me.Text & "?", vbQuestion + vbYesNoCancel)rez = MsgBoxResult.Yes Theni = 0 Then.FileName = Me.TextSaveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then+= 1(i, SaveFileDialog1.FileName, OpenMode.Output)(i, RichTextBox1.Text)ex As Exception("Ошибка открытия файла", MsgBoxStyle.Critical)(i)TryIfi <> 0 Then(i, MyNameFile, OpenMode.Output)(i, RichTextBox1.Text)(i)If()rez = MsgBoxResult.No Then()IfIfSub

Sub SaveToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveToolStripButton.Click()Sub

Sub CutToolStripButton_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CutToolStripButton.Click.SetDataObject(RichTextBox1.SelectedText).SelectedText = ""= TrueSub


Private Sub CopyToolStripButton_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CopyToolStripButton.Click.SetDataObject(RichTextBox1.SelectedText)= TrueSub

Sub PasteToolStripButton_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PasteToolStripButton.Click(data.GetDataPresent(DataFormats.Text)) ThenRichTextBox1.SelectedText = "" Then.Text = RichTextBox1.Text + " " + data.GetData(DataFormats.Text).ToString()RichTextBox1.SelectedText <> "" Then.SelectedText = data.GetData(DataFormats.Text).ToString()IfIf= TrueSub

Sub HelpToolStripButton_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HelpToolStripButton.Click.ShowDialog()Sub

Sub ОчиститьToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ОчиститьToolStripMenuItem.Click.SelectedText = ""SubSub ВыделитьВсеToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ВыделитьВсеToolStripMenuItem.Click.SelectAll()Sub

Sub НайтиToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles НайтиToolStripMenuItem.Click.Show()Sub

Sub ЗаменитьToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ЗаменитьToolStripMenuItem.Click.Show()Sub

Sub НайтиДалееToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles НайтиДалееToolStripMenuItem.Clickl = True Then

: If j <= Len(RichTextBox1.Text) ThenMid(RichTextBox1.Text, j, Len(txt)) = txt Then.Select(j - 1, Len(txt))= j + Len(txt)Until j > Len(RichTextBox1.Text) Or Mid(RichTextBox1.Text, j, Len(txt)) = txt= j + 1.Select(j - 1, Len(txt))= j + Len(txt)Ifj > Len(RichTextBox1.Text) Then("Поиск завершен,начать снова?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "My WordPad")MsgBoxResult.Yes Then= 11IfIf

: ElseIf l = False Thenj <= Len(RichTextBox1.Text) ThenStrComp(Mid(RichTextBox1.Text, j, Len(txt)), txt, CompareMethod.Text) = 0 Then.Select(j - 1, Len(txt))= j + Len(txt)Until j > Len(RichTextBox1.Text) Or StrComp(Mid(RichTextBox1.Text, j, Len(txt)), txt, CompareMethod.Text) = 0= j + 1.Select(j - 1, Len(txt))= j + Len(txt)Ifj > Len(RichTextBox1.Text) Then("Поиск завершен,начать снова?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "My WordPad")MsgBoxResult.Yes Then= 12IfIfIf

Sub

Sub PrintToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrintToolStripButton.Click.DefaultPageSettings = PrintPageSettings= RichTextBox1.Text.Document = PrintDocument1result As DialogResult = PrintDialog1.ShowDialogresult = Windows.Forms.DialogResult.OK Then.Print()Ifex As Exception.Show(ex.Message)TrySub

Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPagestrFormat As New StringFormatrectDraw As New RectangleF(e.MarginBounds.Left, e.MarginBounds.Top, e.MarginBounds.Width, e.MarginBounds.Height)sizeMeasure As New SizeF(e.MarginBounds.Width, e.MarginBounds.Height - PrintFont.GetHeight(e.Graphics)).Trimming = StringTrimming.Word.Graphics.MeasureString(StringToPrint, PrintFont, sizeMeasure, strformat, numChars, numLines)= StringToPrint.Substring(0, numChars).Graphics.DrawString(stringForPage, PrintFont, Brushes.Black, rectDraw, strFormat)numChars < StringToPrint.Length Then= StringToPrint.Substring(numChars).HasMorePages = True.HasMorePages = False= RichTextBox1.TextIfSub

Sub ПараметрыСтраницыToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ПараметрыСтраницыToolStripMenuItem.Click

'Загружаем параметры страницы и отображаем диалоговое окно

'параметров страницы.PageSettings = PrintPageSettings.ShowDialog()ex As Exception

'Отображаем сообщение об ошибке.Show(ex.Message)TrySubSub ОткрытьToolStripMenuItem_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles ОткрытьToolStripMenuItem.MouseHover

.Text = "Открытие существующего документа"Sub

Sub СохранитьToolStripMenuItem_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles СохранитьToolStripMenuItem.MouseHover.Text = "Сохранение активного документа"Sub

Sub СохранитьКакToolStripMenuItem_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles СохранитьКакToolStripMenuItem.MouseHover.Text = "Сохранение активного документа под новым именем"Sub

Sub ПечатьToolStripMenuItem_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles ПечатьToolStripMenuItem.MouseHover.Text = "Печать активного документа"Sub

Sub ПредварительныйПросмотрToolStripMenuItem_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles ПредварительныйПросмотрToolStripMenuItem.MouseHover.Text = "Просмотр документа в полностраничном режиме"Sub

Sub ПараметрыСтраницыToolStripMenuItem_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles ПараметрыСтраницыToolStripMenuItem.MouseHover.Text = "Изменение параметров страницы"Sub

Sub ВыходToolStripMenuItem_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles ВыходToolStripMenuItem.MouseHover.Text = "Завершение работы приложения; сохранение документов"Sub

Sub RichTextBox1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles RichTextBox1.MouseHover.Text = "Для вывода справки нажмите F1"Sub

Sub ВырезатьToolStripMenuItem_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles ВырезатьToolStripMenuItem.MouseHover.Text = "Удаление выделенного фрагмента в буфер обмена"Sub

Sub КопироватьToolStripMenuItem_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles КопироватьToolStripMenuItem.MouseHover.Text = "Копирование выделенного фрагмента в буфер обмена"Sub

Sub ВсToolStripMenuItem_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles ВсToolStripMenuItem.MouseHover.Text = "Вставка содержимого буфера обмена"Sub

Sub ОчиститьToolStripMenuItem_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles ОчиститьToolStripMenuItem.MouseHover.Text = "Удаление выделенного фрагмента"Sub

Sub ВыделитьВсеToolStripMenuItem_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles ВыделитьВсеToolStripMenuItem.MouseHover.Text = "Выделение всего текста"Sub

Sub НайтиToolStripMenuItem_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles НайтиToolStripMenuItem.MouseHover.Text = "Поиск заданного образца текста"Sub

Sub НайтиДалееToolStripMenuItem_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles НайтиДалееToolStripMenuItem.MouseHover.Text = "Повторение поиска"Sub

Sub ЗаменитьToolStripMenuItem_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles ЗаменитьToolStripMenuItem.MouseHover.Text = "Замена одного текста другим"Sub

Sub ПанельИнструментовToolStripMenuItem_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles ПанельИнструментовToolStripMenuItem.MouseHover.Text = "Вывод и скрытие панели инструментов"Sub

Sub СтрокаСостоянияToolStripMenuItem_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles СтрокаСостоянияToolStripMenuItem.MouseHover.Text = "Вывод и скрытие строки состояния"Sub

Sub ДатаИВремяToolStripMenuItem_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles ДатаИВремяToolStripMenuItem.MouseHover.Text = "Вставка в текст текущих даты и/или времени"Sub

Sub ШрифтToolStripMenuItem_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles ШрифтToolStripMenuItem.MouseHover.Text = "Выбор шрифта для выделенного фрагмента текста"Sub

Sub ВызовСправкиToolStripMenuItem_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles ВызовСправкиToolStripMenuItem.MouseHover.Text = "Вывод содержимого встроенной справки"Sub

Sub ОПрограммеToolStripMenuItem_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles ОПрограммеToolStripMenuItem.MouseHover.Text = "Вывод сведений о программе, ее версии и авторских правах"Sub

Sub OpenToolStripButton_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles OpenToolStripButton.MouseHover.Text = "Открытие существующего документа"Sub

Sub SaveToolStripButton_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles SaveToolStripButton.MouseHover.Text = "Сохранение активного документа"Sub

Sub PrintToolStripButton_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles PrintToolStripButton.MouseHover.Text = "Печать активного документа"Sub

Sub CutToolStripButton_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles CutToolStripButton.MouseHover.Text = "Удаление выделенного фрагмента в буфер обмена"Sub

Sub CopyToolStripButton_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles CopyToolStripButton.MouseHover.Text = "Копирование выделенного фрагмента в буфер обмена"Sub

Sub PasteToolStripButton_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles PasteToolStripButton.MouseHover.Text = "Вставка содержимого буфера обмена"Sub

Sub HelpToolStripButton_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles HelpToolStripButton.MouseHover.Text = "Вывод содержимого встроенной справки"Sub

Sub СтрокаСостоянияToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles СтрокаСостоянияToolStripMenuItem.ClickСтрокаСостоянияToolStripMenuItem.CheckState = CheckState.Checked Then

.Visible = TrueСтрокаСостоянияToolStripMenuItem.CheckState = CheckState.Unchecked Then.Visible = FalseIfSub

Sub RichTextBox1_TextChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RichTextBox1.TextChanged= TrueSubSub ОтменитьToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ОтменитьToolStripMenuItem.Click.Undo()Sub

Sub АбзацToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles АбзацToolStripMenuItem.Click.ShowDialog()Form10.DialogResult = Windows.Forms.DialogResult.OK ThenCase v0.SelectionAlignment = HorizontalAlignment.Left1.SelectionAlignment = HorizontalAlignment.Right2.SelectionAlignment = HorizontalAlignment.CenterSelectIf= TrueSub

Sub СоздатьToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles СоздатьToolStripMenuItem.Clickk = True Then= MsgBox("Сохранить изменеия файла " & Me.Text & "?", vbQuestion + vbYesNoCancel)rez = MsgBoxResult.Yes Theni = 0 Then.FileName = Me.TextSaveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then+= 1(i, SaveFileDialog1.FileName, OpenMode.Output)(i, RichTextBox1.Text)ex As Exception("Ошибка открытия файла", MsgBoxStyle.Critical)(i)TryIf

i <> 0 Then(i, MyNameFile, OpenMode.Output)(i, RichTextBox1.Text)(i)Ifrez = MsgBoxResult.Cancel ThenSubIfIf.ShowDialog()Form11.DialogResult = Windows.Forms.DialogResult.OK ThenCase Form11.ListBox1.SelectedIndex0.SaveFileDialog1.FilterIndex = 1.WordWrap = True1.SaveFileDialog1.FilterIndex = 2.WordWrap = False2.SaveFileDialog1.FilterIndex = 3.WordWrap = FalseSelect.Text = ""= FalseIfSub

Sub NewToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewToolStripButton.Clickk = True Then= MsgBox("Сохранить изменеия файла " & Me.Text & "?", vbQuestion + vbYesNoCancel)rez = MsgBoxResult.Yes Theni = 0 Then.FileName = Me.TextSaveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then+= 1(i, SaveFileDialog1.FileName, OpenMode.Output)(i, RichTextBox1.Text)ex As Exception("Ошибка открытия файла", MsgBoxStyle.Critical)(i)TryIfi <> 0 Then(i, MyNameFile, OpenMode.Output)(i, RichTextBox1.Text)(i)

Ifrez = MsgBoxResult.Cancel ThenSubIfIf.ShowDialog()Form11.DialogResult = Windows.Forms.DialogResult.OK ThenCase Form11.ListBox1.SelectedIndex0.SaveFileDialog1.FilterIndex = 1.WordWrap = True1.SaveFileDialog1.FilterIndex = 2.WordWrap = False2.SaveFileDialog1.FilterIndex = 3.WordWrap = FalseSelect.Text = ""= FalseIfSubClassModule1i As Integer = 0k As Boolean = Falsej As Integer = 1txt As Stringl As BooleanMyNameFile As Stringm As Integerv As ShortSub Otkr().OpenFileDialog1.FilterIndex = 1Form1.OpenFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then+= 1(i, Form1.OpenFileDialog1.FileName, OpenMode.Input)= Form1.OpenFileDialog1.FileName.Text = ""Form1.OpenFileDialog1.FilterIndex = 1 Then.RichTextBox1.WordWrap = TrueForm1.OpenFileDialog1.FilterIndex = 2 Then.RichTextBox1.WordWrap = FalseIf= Len(MyNameFile)Until Mid(MyNameFile, m, 1) = "\".Text = Mid(MyNameFile, m, 1) + Form1.Text

= m - 1.RichTextBox1.Text = ""Until EOF(i).RichTextBox1.Text = Form1.RichTextBox1.Text & LineInput(i) & vbCrLf.RichTextBox1.Select(1, 0)= Falseex As Exception("Ошибка открытия файла", MsgBoxStyle.Critical)(i)TryIfSubSub Sohr()i = 0 ThenForm1.SaveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then+= 1= Form1.SaveFileDialog1.FileName.Text = ""= Len(MyNameFile)Until Mid(MyNameFile, m, 1) = "\".Text = Mid(MyNameFile, m, 1) + Form1.Text= m - 1(i, Form1.SaveFileDialog1.FileName, OpenMode.Output)(i, Form1.RichTextBox1.Text)= Falseex As Exception("Ошибка открытия файла", MsgBoxStyle.Critical)(i)TryIf(i, MyNameFile, OpenMode.Output)(i, Form1.RichTextBox1.Text)(i)= FalseIfSubSub Found()

: txt = Form8.TextBox1.Text.НайтиДалееToolStripMenuItem.Enabled = Truej <= Len(Form1.RichTextBox1.Text) ThenMid(Form1.RichTextBox1.Text, j, Len(Form8.TextBox1.Text)) = txt Then.Focus().RichTextBox1.Select(j - 1, Len(Form8.TextBox1.Text))= j + Len(Form8.TextBox1.Text)Until j > Len(Form1.RichTextBox1.Text) Or Mid(Form1.RichTextBox1.Text, j, Len(Form8.TextBox1.Text)) = txt= j + 1.Focus().RichTextBox1.Select(j - 1, Len(Form8.TextBox1.Text))= j + Len(Form8.TextBox1.Text)Ifj > Len(Form1.RichTextBox1.Text) Then("Поиск завершен. Начать заново?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "My WordPad")MsgBoxResult.Yes Then= 11MsgBoxResult.No Then.Close()IfIfSub

Sub Found1()

: txt = Form8.TextBox1.Text.НайтиДалееToolStripMenuItem.Enabled = Truej <= Len(Form1.RichTextBox1.Text) ThenStrComp(Mid(Form1.RichTextBox1.Text, j, Len(Form8.TextBox1.Text)), txt, CompareMethod.Text) = 0 Then.Focus().RichTextBox1.Select(j - 1, Len(Form8.TextBox1.Text))= j + Len(Form8.TextBox1.Text)Until j > Len(Form1.RichTextBox1.Text) Or StrComp(Mid(Form1.RichTextBox1.Text, j, Len(Form8.TextBox1.Text)), txt, CompareMethod.Text) = 0= j + 1.Focus().RichTextBox1.Select(j - 1, Len(Form8.TextBox1.Text))= j + Len(Form8.TextBox1.Text)Ifj > Len(Form1.RichTextBox1.Text) Then("Поиск завершен. Начать заново?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "My WordPad")MsgBoxResult.Yes Then= 11MsgBoxResult.No Then.Close()

IfIfSubModuleClass Form8Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click.Close()Sub

Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.ClickCheckBox2.CheckState = CheckState.Checked Then Found(): l = TrueCheckBox2.CheckState = CheckState.Unchecked Then Found1(): l = FalseSub

Sub Form8_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.LoadTextBox1.Text <> "" Then Button1.Enabled = TrueTextBox1.Text = "" Then Button1.Enabled = False.Text = txtSub

Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChangedTextBox1.Text <> "" Then Button1.Enabled = TrueTextBox1.Text = "" Then Button1.Enabled = FalseSubClassClass Form9

Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click.Close()Sub

Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click= Me.TextBox1.Text

: If CheckBox2.CheckState = CheckState.Checked Thenj <= Len(Form1.RichTextBox1.Text) ThenMid(Form1.RichTextBox1.Text, j, Len(Me.TextBox1.Text)) = txt Then.Focus().RichTextBox1.Select(j - 1, Len(Me.TextBox1.Text))= j + Len(Me.TextBox1.Text)Until j > Len(Form1.RichTextBox1.Text) Or Mid(Form1.RichTextBox1.Text, j, Len(Me.TextBox1.Text)) = txt

= j + 1.Focus().RichTextBox1.Select(j - 1, Len(Form8.TextBox1.Text))= j + Len(Form8.TextBox1.Text)Ifj > Len(Form1.RichTextBox1.Text) Then("Поиск завершен. Начать заново?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "My WordPad")MsgBoxResult.Yes Then= 11MsgBoxResult.No Then.Close()IfIf

: ElseIf CheckBox2.CheckState = CheckState.Unchecked Thenj <= Len(Form1.RichTextBox1.Text) ThenStrComp(Mid(Form1.RichTextBox1.Text, j, Len(Me.TextBox1.Text)), txt, CompareMethod.Text) = 0 Then.Focus().RichTextBox1.Select(j - 1, Len(Me.TextBox1.Text))= j + Len(Me.TextBox1.Text)Until j > Len(Form1.RichTextBox1.Text) Or StrComp(Mid(Form1.RichTextBox1.Text, j, Len(Me.TextBox1.Text)), txt, CompareMethod.Text) = 0= j + 1.Focus().RichTextBox1.Select(j - 1, Len(Me.TextBox1.Text))= j + Len(Me.TextBox1.Text)Ifj > Len(Form1.RichTextBox1.Text) Then("Поиск завершен. Начать заново?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "My WordPad")MsgBoxResult.Yes Then= 12MsgBoxResult.No Then.Close()IfIfIfSub

Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.ClickForm1.RichTextBox1.SelectedText = "" Then

: If CheckBox2.CheckState = CheckState.Checked Then= Me.TextBox1.Textj <= Len(Form1.RichTextBox1.Text) ThenMid(Form1.RichTextBox1.Text, j, Len(Me.TextBox1.Text)) = txt Then.Focus().RichTextBox1.Select(j - 1, Len(Me.TextBox1.Text))= j + Len(Me.TextBox1.Text)Until j > Len(Form1.RichTextBox1.Text) Or Mid(Form1.RichTextBox1.Text, j, Len(Me.TextBox1.Text)) = txt= j + 1.Focus().RichTextBox1.Select(j - 1, Len(Form8.TextBox1.Text))= j + Len(Form8.TextBox1.Text)Ifj > Len(Form1.RichTextBox1.Text) Then("Поиск завершен. Начать заново?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "My WordPad")MsgBoxResult.Yes Then= 11MsgBoxResult.No Then.Close()IfIfCheckBox2.CheckState = CheckState.Unchecked Then= Me.TextBox1.Textj <= Len(Form1.RichTextBox1.Text) ThenStrComp(Mid(Form1.RichTextBox1.Text, j, Len(Me.TextBox1.Text)), txt, CompareMethod.Text) = 0 Then.Focus().RichTextBox1.Select(j - 1, Len(Me.TextBox1.Text))= j + Len(Me.TextBox1.Text)Until j > Len(Form1.RichTextBox1.Text) Or StrComp(Mid(Form1.RichTextBox1.Text, j, Len(Me.TextBox1.Text)), txt, CompareMethod.Text) = 0= j + 1.Focus().RichTextBox1.Select(j - 1, Len(Me.TextBox1.Text))= j + Len(Me.TextBox1.Text)Ifj > Len(Form1.RichTextBox1.Text) Then("Поиск завершен. Начать заново?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "My WordPad")MsgBoxResult.Yes Then= 11MsgBoxResult.No Then

.Close()IfIfIfForm1.RichTextBox1.SelectedText <> "" Then.RichTextBox1.SelectedText = Me.TextBox2.TextIfSub


Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click= 1= Me.TextBox1.TextWhile j <= Len(Form1.RichTextBox1.Text)Mid(Form1.RichTextBox1.Text, j, Len(Me.TextBox1.Text)) = txt Then.RichTextBox1.Select(j - 1, Len(Me.TextBox1.Text)).RichTextBox1.SelectedText = Me.TextBox2.Text= j + Len(Me.TextBox1.Text)Until j > Len(Form1.RichTextBox1.Text) Or Mid(Form1.RichTextBox1.Text, j, Len(Me.TextBox1.Text)) = txt= j + 1If("Поиск завершен", MsgBoxStyle.Information)Sub

Sub Form9_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load.TopMost = TrueTextBox1.Text <> "" Then Button1.Enabled = True: Button2.Enabled = True: Button3.Enabled = TrueTextBox1.Text = "" Then Button1.Enabled = False: Button2.Enabled = False: Button3.Enabled = False.Text = txtSub

Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChangedTextBox1.Text <> "" Then Button1.Enabled = True: Button2.Enabled = True: Button3.Enabled = TrueTextBox1.Text = "" Then Button1.Enabled = False: Button2.Enabled = False: Button3.Enabled = FalseSubClassClass Form5

Sub Form5_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load.Items.Clear().Items.Add(System.DateTime.Now.ToLongDateString).Items.Add(System.DateTime.Now.ToShortDateString).Items.Add(System.DateTime.Now.ToLongTimeString).Items.Add(System.DateTime.Now.ToShortTimeString).Items.Add(System.DateTime.Now.DayOfWeek.ToString).Items.Add(System.DateTime.Now.Day.ToString).Items.Add(System.DateTime.Now.Month.ToString).Items.Add(System.DateTime.Now.Year.ToString).SelectedIndex = 0Sub

Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click.DialogResult = Windows.Forms.DialogResult.OKSub

Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click.DialogResult = Windows.Forms.DialogResult.CancelSubClassClass Form11Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click.DialogResult = Windows.Forms.DialogResult.OKSub

Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click.DialogResult = Windows.Forms.DialogResult.CancelSub

Sub Form11_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load.Items.Clear().Items.Add("Документ в формате RTF").Items.Add("Текстовый документ").Items.Add("Документ в Юникоде").SelectedIndex = 0SubClass



Поделиться:




Поиск по сайту

©2015-2024 poisk-ru.ru
Все права принадлежать их авторам. Данный сайт не претендует на авторства, а предоставляет бесплатное использование.
Дата создания страницы: 2020-04-01 Нарушение авторских прав и Нарушение персональных данных


Поиск по сайту: