[Help] Read & write text file like:NAME1, LINK[Solved]
Hello,
I'm making a radioplayer, but i need to write and read file like this:
RADIO1, LINKTOSTREAM
RADIO2, LINKTOSTREAM
etc..
Now i'm trying to get that RADIO1, RADIO2.. intro a listbox, and the radio1link must be loaded if i click radio1 (same for other radio's)
Do you guys know some code or a google search tag? I already found reading files line by line but i'm unable to make the listbox load the link if i click on the item.
Example:
Save each radiostream in one line.
Radio1=Link
Radio2=Link
Radio3=Link
[highlight="VBnet"]Dim line as string
Using sRead as new io.streamreader("filepath")
while not sread.endofstream
line = sread.readline
if line.trim <> "" then
dim splitted() as string = split(line, "=")
listbox1.items.add(splitted(0))
listbox1.items(listbox1.items.count - 1).subitems.add(splitted(1))
end if
end while
end using[/highlight]