I understand that the MessageBox icon enumeration values map to system
sounds. This seems to be fairly predictable, even if the mapping sometimes
don't make sense. However, I've found a scenario in which it doesn't behave
correctly.

In a textbox's Validating event, when I call a MessageBox.Show, the first
time it plays the System's Default sound, no matter which icon value I
choose. Subsequent calls use the correct sound:

Private Sub MyTextBox_Validating(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) _
Handles MyTextBox.Validating
MessageBox.Show("This is an error","Error",, MessageBoxButtons.OK,
MessageBoxIcon.Error) ' This plays the system's Default sound
MessageBox.Show("This is an error","Error",, MessageBoxButtons.OK,
MessageBoxIcon.Error) ' This plays the system's Critial Stop sound
End Sub

Even if I change the first MessageBox's icon to MessageBoxIcon.None, it
still plays the Default sound. It only seems to do this in this event. When I
paste the same code into a button click handler, it behaves as expected.

Is this a bug in the messagebox?