Either I'm making an error or there are two bugs I have found in .NET 2.0 Beta ....
private void button2_Click(object sender, EventArgs e)
{
toolStripStatusLabel1.Text =
"Asterisk";toolStripProgressBar1.Value = 33;
System.Media.
SystemSounds.Asterisk.Play();System.Threading.
Thread.Sleep(750);
toolStripStatusLabel1.Text =
toolStripProgressBar1.Value = 66;
System.Media.
SystemSounds.Beep.Play();System.Threading.
Thread.Sleep(750);
toolStripStatusLabel1.Text =
toolStripProgressBar1.Value = 100;
System.Media.
SystemSounds.Question.Play();
toolStripProgressBar1.Value = 0;
}
As you can see from the example I am playing some system sounds and updating a status bar and a label.
The first problem is that the status label will not update on the UI after its text property has changed. I have tried .Invalidate and other things but it just won't update.
The second problem is that System.Media.SystemSounds.Question.Play(); does nothing ! !
TIA
Bill

Bugs in .NET 2.0 ?
Graeme
Miran
this.Text = toolStripStatusLabel1.Text = "Asterisk";
toolStripProgressBar1.Value = 20;
Application.DoEvents();System.Media.
SystemSounds.Asterisk.Play();System.Threading.
Thread.Sleep(750);this.Text = toolStripStatusLabel1.Text = "Beep";
toolStripProgressBar1.Value = 40;
Application.DoEvents();System.Media.
SystemSounds.Beep.Play();System.Threading.
Thread.Sleep(750);...although I still think it is a bug with the status bar
Bill
jbierling
Johan Strand
On the question of Question.Play() not doing anything, my best guess would be that you don't have a sound associated with a question. That's probably not your problem, but it wouldn't hurt to check.