I want to make the program automatically make changes to the file. On C #, I looked at the code like this:

RichTextBox1.LoadFile(@"D:\Записи.txt",RichTextBoxStreamType.PlainText) 

But in VB, I tried to do the same, but it does not work. The file is created, but the entries in it do not appear.

    1 answer 1

    While loading

     rtb.LoadFile(path, RichTextBoxStreamType.PlainText) 

    Any change

     Private Sub rtb_TextChanged(sender As Object, e As EventArgs) Handles rtb.TextChanged rtb.SaveFile(path, RichTextBoxStreamType.PlainText) End Sub 

    When unloading

     rtb.SaveFile(path, RichTextBoxStreamType.PlainText) 
    • Thanks, it helped. - Angus123