I'm making an Mp3 player in Visual Basic. It was all going well till I decided I wanted a "Recent plays" list. I want it to be able to save and load multible items.
I'm not getting any errors with my code, it just adds some kind of collection to the list. Here is the relevant code:
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
ListBox1.Items.Add(My.Settings.Recent)
End Sub
Private Sub Label6_Click(sender As Object, e As EventArgs) Handles Label6.Click
If Label6.Text = "Play" Then
My.Settings.Recent.Add(OpenFileDialog1.FileName.ToString)
ListBox1.Items.Add(My.Settings.Recent)
My.Settings.Save()
WindowsMediaPlayer1.URL = Label5.Text
WindowsMediaPlayer1.Ctlcontrols.play()
Label6.Text = "Pause"
End If
End Sub
If you want to see more code just ask.