Read Contents of a Text File With Stream Reader 'Read from a text file to a textbox with the Stream Reader Class 'Put a textbox on the form and name txt and set to multi-line 'Make the Reader read the entire contents of the textfile and write to the textbox 'Add to text file Dim sReader As IO.StreamReader = New IO.StreamReader("c:\newTextFile.txt") 'Make the textbox keep the current data while adding the new data txt.AppendText(sReader.ReadToEnd)
|