create a bool field bool keepPlaying = true; then while (keepPlaying) { pl.Clear() // This might not be exactly correct, look up how to clear the list if (files != null) { if (files.Length <= index) { index = 0; } else { m = axWindowsMediaPlayer1.newMedia(files[index++].FullName); pl.appendItem(m); } } axWindowsMediaPlayer1.currentPlaylist = pl; } then you can have a cancel button and in the `onclick` handler have `keepPlaying = false;`. Of course that will only stop when it reaches the end of the playlist, unless you also stop the player when setting the flag to false. You are having a lot of problems getting this application working, mostly with concepts that are elementary. I would seriously suggest that you get a C# getting started book and work through it, before continuing. Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”