Объясните - VB
Формулировка задачи:
Помогите пожалуйста!) Я не могу понять как мне при сохранении текстового файла и замене его фона, чтобы загружался этот фон????
Вся программа основана на RichTextBox
Решение задачи: «Объясните»
textual
Листинг программы
Private Sub Command1_Click() CDialog1.Filter = "Текстовые файлы|*.txt| All Files|*.*|ТА|*.tbt" CDialog1.DefaultExt = "txt" CDialog1.InitDir = App.Path CDialog1.ShowOpen RTB1.SaveFile (CDialog1.FileName) Frm1.Caption = CDialog1.FileTitle Dim f As Double f = FreeFile Open Left(CDialog1.FileTitle, Len(CDialog1.FileTitle) - 4) & "_cl.txt" _ For Output As #f Print #f, RTB1.BackColor Close #f End Sub Private Sub Command2_Click() CDialog1.Filter = "Текстовые файлы|*.txt| All Files|*.*|ТА|*.tbt" CDialog1.DefaultExt = "txt" CDialog1.InitDir = App.Path CDialog1.ShowOpen RTB1.LoadFile (CDialog1.FileName) Frm1.Caption = CDialog1.FileTitle f = FreeFile Dim bac Open Left(CDialog1.FileTitle, Len(CDialog1.FileTitle) - 4) & "_cl.txt" For Input As #f Line Input #f, bac RTB1.BackColor = bac Close #f End Sub
ИИ поможет Вам:
- решить любую задачу по программированию
- объяснить код
- расставить комментарии в коде
- и т.д