Originally Posted by
Blubb1337
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]
I'm using DotNetBar (itempanel)
so it will be this:
Code:
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, "=")
ItemPanel1.Items.Add(splitted(0))
ItemPanel1.Items(ItemPanel1.Items.Count - 1).SubItems.Add(splitted(1))
End If
End While
End Using
and it gives this error:
Code:
Error 2 Value of type 'String' cannot be converted to 'DevComponents.DotNetBar.BaseItem'. C:\Users\...\Documents\Visual Studio 2010\Projects\Radio Player1\Radio Player1\Form1.vb...
on:'splitted(0)' and 'splitted(1)' is there a way to use this with itempanel or do i have to use a listbox?
EDIT:For testing i added a listbox and used your code and for some reason this line:'ListBox1.Items(ListBox1.Items.Count - 1).SubItems.Add(splitted(1))' get highlighted in yellow without any error or warning showing.
NVM all above this.
When i click an item i want the program to do this:
AxWindowsMediaPlayer1.URL = LINK