Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[NEED HELP] how to read a text file and import to listview vb.net
#1
Hello guys at SupportForums.net
I am looking for a way to read a text file ( Prefferably a text file inside the program that will be saved each time the program is closed. ) and import it to a listview.

And please do not spoon feed me, I want to learn something from this.
Thanks in advanced.
Reply
#2
"A text file inside the program" - You're referring to a resoruce? And saved where? As an updated resource? Or as a file inside Windows Explorer on the NTFS filesystem? You need to be more specific.

How much data is this "text file inside the program" going to hold? Is it going to be large amounts of data or small amounts, because you could use string resources, although I would ask why you'd want to embed this data as it only makes the base executable a larger filesize for no reason.
Reply
#3
(02-12-2012, 08:13 PM)AceInfinity Wrote: "A text file inside the program" - You're referring to a resoruce? And saved where? As an updated resource? Or as a file inside Windows Explorer on the NTFS filesystem? You need to be more specific.

How much data is this "text file inside the program" going to hold? Is it going to be large amounts of data or small amounts, because you could use string resources, although I would ask why you'd want to embed this data as it only makes the base executable a larger filesize for no reason.
Yes I want the text file to be inside the resources, and it will have links in it.
I would also need to know how to write to the text file.

Thanks a lot for your time.
Reply
#4
Why does it need to be in resources? And if that's the case, you're better off with a string table.
Reply
#5
(02-13-2012, 05:10 AM)AceInfinity Wrote: Why does it need to be in resources? And if that's the case, you're better off with a string table.

It doesn't need to, but I think it will look unprofessional if it's just lying around on the desktop.
Reply
#6
(02-13-2012, 06:11 AM)w00pz Wrote: It doesn't need to, but I think it will look unprofessional if it's just lying around on the desktop.

It's not unprofessional, but it doesn't have to lie around on the desktop either Smile You could have it in your program files directory, a temp directory, anywhere. You could have it created in the directory with your application, so that it always looks for that location. And if it doesn't exist, then it re-creates it starting over with the data it beholds. Lots of different ways you can go about something like this, but an external file in my opinion would be much more manageable.
Reply
#7
(02-13-2012, 06:32 AM)AceInfinity Wrote: It's not unprofessional, but it doesn't have to lie around on the desktop either Smile You could have it in your program files directory, a temp directory, anywhere. You could have it created in the directory with your application, so that it always looks for that location. And if it doesn't exist, then it re-creates it starting over with the data it beholds. Lots of different ways you can go about something like this, but an external file in my opinion would be much more manageable.
Well I have no idea how to do all this, but if you wanna learn me how to do it then that would be extremely cool. Smile
Reply
#8
You mention this:
Quote:And please do not spoon feed me, I want to learn something from this.

So I won't do that, but I'll give you some inspiration.

http://msdn.microsoft.com/en-us/library/...riter.aspx
http://msdn.microsoft.com/en-us/library/...eader.aspx

http://msdn.microsoft.com/en-us/library/...rpath.aspx

http://msdn.microsoft.com/en-us/library/...range.aspx
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  TextBox2.Text | Transfer Text to ListBox Die 3 2,677 01-02-2012, 06:09 PM
Last Post: AceInfinity
  ListView Custom Search Filter - List(Of T) Method AceInfinity 4 3,705 12-31-2011, 03:35 PM
Last Post: AceInfinity
  [Source]File Assembly changer Vb.Net[Source] Digital-Punk 0 3,105 10-13-2011, 06:35 PM
Last Post: Digital-Punk
  Drag and Drop to Listview [Tutorial] AceInfinity 3 2,874 09-03-2011, 05:29 AM
Last Post: .edit
  [Help] - ListView Control Fragma 2 1,160 08-19-2011, 05:10 AM
Last Post: Fragma

Forum Jump:


Users browsing this thread: 3 Guest(s)