WMPLib.IWMPPlaylist pl; public WMPLib.IWMPMedia files1,paths1; string playListName; private void toolStripButton3_Click(object sender, EventArgs e) { if (listnametxt.Text == "") { playListName = "Untitled playlist"; } else { playListName = listnametxt.Text; } pl = axWindowsMediaPlayer1.playlistCollection.newPlaylist(playListName); playlistviewbar.Items.Add(playListName); } private void toolStripButton2_Click(object sender, EventArgs e) { if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK) { string[] filestring=openFileDialog2.SafeFileNames; string[] pathstring=openFileDialog2.FileNames; for (int i = 0; i < filestring.Length; i++) { files1 = axWindowsMediaPlayer1.newMedia(filestring[i]); paths1 = axWindowsMediaPlayer1.newMedia(pathstring[i]); pl.appendItem(paths1); axWindowsMediaPlayer1.currentPlaylist =pl; } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)