Hi,
I have a form that loads mp3 file names into a listview with another column for their duration.
code:
Dim fname As String
fname = System.IO.Path.GetFileName(OpenFileDialog2.FileName)
Dim Duration As String = 0
Dim w As New WMPLib.WindowsMediaPlayer
Dim m As WMPLib.IWMPMedia = w.newMedia(fname)
If m IsNot Nothing Then
Duration = m.durationString
End If
w.close()
ListView1.Items.Add(fname).SubItems.Add(Duration)
I would like to have a label or textbox that has total time for all files in the listview and something that will re-calculate
if i delete a file from the listview.
I know the code I'm using is converting to string which is probably the problem; but I'm not sure. Looked
everywhere i could on WMPlib and couldn't find an answer/figure it out.
Any help is appreciated.
Thanks,
J
I have a form that loads mp3 file names into a listview with another column for their duration.
code:
Dim fname As String
fname = System.IO.Path.GetFileName(OpenFileDialog2.FileName)
Dim Duration As String = 0
Dim w As New WMPLib.WindowsMediaPlayer
Dim m As WMPLib.IWMPMedia = w.newMedia(fname)
If m IsNot Nothing Then
Duration = m.durationString
End If
w.close()
ListView1.Items.Add(fname).SubItems.Add(Duration)
I would like to have a label or textbox that has total time for all files in the listview and something that will re-calculate
if i delete a file from the listview.
I know the code I'm using is converting to string which is probably the problem; but I'm not sure. Looked
everywhere i could on WMPlib and couldn't find an answer/figure it out.
Any help is appreciated.
Thanks,
J