Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Using the WMPLib

I get al list of song from my music folder and set them in a playlist and programatically play. The song is playing whilst I am doing other things with the application.

I am wondering why it stops, and how to alter this.

What I have tried:

WindowsMediaPlayer w = new WindowsMediaPlayer();
         WMPLib.IWMPPlaylist pl = w.newPlaylist("newL", "");
         //throw new NotImplementedException();
         foreach (string m in musicF )
         {
             //playFile(m);
             // w.newMedia(m);
             pl.appendItem(w.newMedia(m));
             //w.controls.stop();
         }
         w.currentPlaylist = pl;
         w.controls.play();
Posted
Comments
[no name] 10-Sep-20 14:09pm    
It stops because you are "doing other things with the application" that are obviously conflicting.
MarcusCole6833 10-Sep-20 15:38pm    
thank you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900