Quote:
And one more, if i press button and the music is playing, button is pressed, when i press again it's unpressed and music stop.
This is a bit easier. :) To be able to stop the sound once you've started it, the SoundPlayer object not only needs to persist beyond the scope of the button's click handler, it also has to remain accessible. To achieve this, I made the player object a member of the form class. I also added a bool variable that indicates whether the program currently is in the "playing" state: