|
-
Feb 20th, 2013, 04:03 AM
#1
Thread Starter
Member
Visual Basic 2012 - File "log.log" to ListBox (multiple lines) Help
Hi! I got a little problem:
I made an application in Visual Studio 2012 and I need the application to read a "log.log" file and write the content of the file in a ListBox. I've made that using this code:
Code:
var = My.Computer.FileSystem.ReadAllText(TextBox15.Text & "\logs\log.log")
As you can see, the content of the file "log.log" is written in a variable called "var", thats okay but after that, I need the application to write the content of "var" in a LISTBOX in MULTIPLE ITEMS. The file "log.log" has multiple lines but when I write the content of the "log.log" in the Listbox, it just creates 1 item with all the content.
What I need is something that detects the different lines of the "log.log" content and write each line in a different item of the listbox.
NOTE: When I open the "log.log" file with the Windows txt editor, it displays all the content in 1 line too. If I open the "log.log" file with a program such as Notepad ++ (Code editor that supports many formats) its shows correctly, in different lines.
NOTE2: Each line of the "log.log" has 2 initial characters "ch". That may help detecting the lines and separate them.
Help please? Thanks so much.
Last edited by corei7; Feb 20th, 2013 at 04:11 AM.
Tags for this Thread
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
|