见面主题:
public void TimerFunc(){
...
while (true)
{
...
sound.PlayLooping();
// Displays the MessageBox and waits for user input
MessageBox.Show(message, caption, buttons);
// End the sound loop
sound.Stop();
...
}
}
线程由主界面中的按钮启动,并且可以被界面中的按钮杀死。
如果线程在等待用户输入时被杀死,我如何让声音循环停止?