Hi!!
If you select many MP3 files and press enter, and the default program to open the MP3 files is windows media player. It opens windows media player with all the files in the playlist "Now Playing".
How can I do so that my program acts the same, but just adds the filenames to a Listbox?
I have this code but it doesnt work, well works but just for a single file:
vb.net Code:
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If My.Application.CommandLineArgs.Count > 0 Then For a As Integer = 0 To My.Application.CommandLineArgs.Count - 1 Dim FI As New IO.FileInfo(My.Application.CommandLineArgs(a)) If FI.Extension.ToUpper = ".MP3" Then Listbox1.Items.Add(IO.Path.GetFileNameWithoutExtension(My.Application.CommandLineArgs(a))) End If Next End If End Sub




Reply With Quote