could you help me? I have been investigating and I can not find a solution.
I'm working on C #. I have a button called Play that executes this code
//esto va hasta arriba donde estan los demas using
using WMPLib;
//esto se ejecuta al presionar un boton
try
{
wplayer = new WindowsMediaPlayer
{
URL = rutaCancion //variable global tipo string
};
wplayer.controls.play();
}
catch (Exception exe)
{
}
rutaCancion contains the song route. When pressing the play button, the song is executed, the problem is that when I select another route, and press play, the previous song does not stop playing, but continues playing and the other song starts (they are played at the same time). / p>
How do I stop the previous song? I tried to put this code
wplayer.controls.stop();
before giving play but no longer plays anything.