displaying files

webster972

Member
Joined
Jun 23, 2004
Messages
7
How do I display current text files in a textbox after I "load" them. For example, I load file1, display it in a text box..and then I load file 2....I wanna somehow get a textbox thatll display "file1.txt" and "file2.txt" and so on..I would appreciate any help, thanks!
 
You want to display both text files in one textbox at the same time?

To get the text from a file into a textbox, you just ReadToEnd.
Dim SR As StreamReader = New StreamReader(filename)
SR looks at the file.
TB.Text = SR.ReadToEnd()
Puts everything in the file into the textbox.
SR.Close()
Close the SR.
 
Iceplug said:
You want to display both text files in one textbox at the same time?

To get the text from a file into a textbox, you just ReadToEnd.
Dim SR As StreamReader = New StreamReader(filename)
SR looks at the file.
TB.Text = SR.ReadToEnd()
Puts everything in the file into the textbox.
SR.Close()
Close the SR.


Just the text file names..not the content, only the current file content that I have open.
 
Why do you need to load the files themselves? Check out the OpenFileDialog control and the RichTextBox control
 
Back
Top