I have the following C # statement:
Code:
...
using (SoundPlayer player = new SoundPlayer(Properties.Resources.ring))
{
player.Play();

  //What should I write here? 
  while (If the bell is running, wait here)
  {
      if (player.Stop()==true)
      {
          this.progressBarControl1.Visible = false; //false = không cho phép hiện
      }
  }
}
...
I want to check if the ringer is running or stopping, if it is running then wait until it stops before running this.progressBarControl1.Visible = false.