writing strings

McBain

Newcomer
Joined
Apr 10, 2003
Messages
8
i have a little problem with writing outputs from strings
the output is a listbox, and the strings are Artist and Title (its an MP3 player we are making)
the problem is that the only artistnames are written in the output. the title is never written

this is the code:
lstPlaylist.Items.Add(i & ". " & txtArtist & " - " txtTitle)

everything after txtArtist wont appear in the list box, including "-" doesnt show up
 
opss, forgot to put a character

its
lstPlaylist.Items.Add(i & ". " & txtArtist & " - " & txtTitle)

its seems that the strings never end cause " is missing in the end of the strings
 
It still doesnt work.
Sometimes i really enjoy programming ;)

I get the text from the ID3-tag from Mp3 and this is the code for that.

Dim mp As FileStream
Dim Title(30) As Byte
Dim Artist(30) As Byte
Dim Album(30) As Byte
Dim Year(4) As Byte
Dim Comments(30) As Byte
mp = New FileStream(Öppna.FileName, FileMode.Open)
mp.Seek(-125, SeekOrigin.End)
mp.Read(Title, 0, 30)
mp.Seek(-95, SeekOrigin.End)
mp.Read(Artist, 0, 30)
mp.Seek(-65, SeekOrigin.End)
mp.Read(Album, 0, 30)
mp.Seek(-35, SeekOrigin.End)
mp.Read(Year, 0, 4)
mp.Seek(-31, SeekOrigin.End)
mp.Read(Comments, 0, 30)
Dim TxtTitle As String = System.Text.Encoding.ASCII.GetString(Title)
Dim TxtArtist As String = System.Text.Encoding.ASCII.GetString(Artist)
Dim TxtAlbum As String = System.Text.Encoding.ASCII.GetString(Album)
Dim TxtYear As String = System.Text.Encoding.ASCII.GetString(Year)
Dim TextComments As String = System.Text.Encoding.ASCII.GetString(Comments)
mp.Close()
 
Back
Top