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:
  1. Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  2.         If My.Application.CommandLineArgs.Count > 0 Then
  3.             For a As Integer = 0 To My.Application.CommandLineArgs.Count - 1
  4.                 Dim FI As New IO.FileInfo(My.Application.CommandLineArgs(a))
  5.                 If FI.Extension.ToUpper = ".MP3" Then
  6.                    Listbox1.Items.Add(IO.Path.GetFileNameWithoutExtension(My.Application.CommandLineArgs(a)))
  7.                 End If
  8.             Next
  9.         End If
  10.     End Sub