I'm basically making a audio player in vb.net, where users can upload files using openfiledialog, and then play them later on. Im wanting to gather some meta data from my uploaded songs such as the album and artist to be displayed.
I've looked around but cant seem to find anything on this problem, if anyone has any ideas it would be greatly appreciated.
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button_Upload.Click
OpenFileDialog1.InitialDirectory = "C:\"
OpenFileDialog1.Title = "Upload A Song"
OpenFileDialog1.Filter = "Audio Files|*.mp3; *.wav"
OpenFileDialog1.Multiselect = False
If OpenFileDialog1.ShowDialog = DialogResult.OK Then
Dim Upload_Path As String = IO.Path.Combine(Application.StartupPath, "Resources")
If IO.Directory.Exists(Upload_Path) Then
IO.File.Copy(OpenFileDialog1.FileName, IO.Path.Combine(Upload_Path, IO.Path.GetFileName(OpenFileDialog1.FileName)))
Else
System.IO.Directory.CreateDirectory(Upload_Path)
IO.File.Copy(OpenFileDialog1.FileName, IO.Path.Combine(Upload_Path, IO.Path.GetFileName(OpenFileDialog1.FileName)))
End If
Else
MsgBox("Invalid Selection")
End If
End Sub