Dong Lam Trien

Dong Lam Trien

  • 1.2k
  • 695
  • 60k

Is the command to check if the bell is running or stopped ?

Nov 8 2019 2:00 AM
I have the following C # statement:
  1. using (SoundPlayer player = new SoundPlayer(Properties.Resources.ring))  
  2. {  
  3. player.Play();  
  4.   //What should I write here?   
  5.   while (If the bell is running, wait here)  
  6.   {  
  7.       if (player.Stop()==true)  
  8.       {  
  9.           this.progressBarControl1.Visible = false//false = không cho phép hi?n  
  10.       }  
  11.   }  
  12. }  
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.

Answers (2)