|
-
Mar 17th, 2009, 03:08 PM
#1
Thread Starter
Junior Member
Reading a textfile (in resources) into a textbox
Hello,
How would i read a textfile that is in My.Resources and put the whole document in a textbox for the user to see?
I figured i would need a IO.StreamReader and a IO.StringReader but cant figure out too much what to do with these.
I figured i could create a loop until it has read to the end of the document but there is no check called HasLineAvailable or something.
Regards.
-
Mar 17th, 2009, 03:24 PM
#2
Hyperactive Member
Re: Reading a textfile (in resources) into a textbox
Have you tried
TextBox1.Text = My.Resources.Name Of File
-
Mar 17th, 2009, 04:50 PM
#3
Re: Reading a textfile (in resources) into a textbox
A StreamReader is used to read text data from a stream, so thats nothing you would use in this case.
The StringReader class works very similar to the StreamReader, only that it works in strings instead of streams. From what I understand you dont need to perform any such operations on the string, but just display it in a TextBox. The post above holds the key
-
Mar 17th, 2009, 05:01 PM
#4
Thread Starter
Junior Member
Re: Reading a textfile (in resources) into a textbox
Haha after trying all the complicated ideas the simplist works =D.
Thanks guys,
Regards.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|