title: Making music stop after form is closed and play when a form is loaded
body: <p>For the application that i am creating i am trying to add in music which plays when form2 is opened. which seems to work just fine, the only issue i have is when i close the form it immediately starts playing the music again. Here is my code:</p>
  <pre><code>        private void Form2_Load(object sender, EventArgs e)
          {
              music(true);
          }
          private void Form2_FormClosed(object sender, FormClosedEventArgs e)
          {
              music(false);
          }
          private void music(bool placeholder)
          {
              System.IO.Stream str = Properties.Resources.Music;
              System.Media.SoundPlayer snd = new System.Media.SoundPlayer(str);
              if (placeholder = true)
              {
                  snd.Play();
              } else
              {
                  snd.Stop();
              }
          }
  </code></pre>
  <p>if i start my application it doesnt play any music which it should since it opens on form1. When i open form2 it plays the music as it should but when i close it, it restarts the music and it just keeps playing.</p>