How do I play the "New Mail" system sound in C#? This is also called the "Notify" sound.
In Win32, that would be something like
sndPlaySound('Notify', (SND_ALIAS or SND_ASYNC));
So how do you do that in .Net? I know that you can do
System.Media.SystemSounds.Asterisk.Play();
But there's a very limited set of five sounds there - not including whatever the the user has set as the new mail sound.
I can find out which .wav file is being played when I get new mail and play that file, but that won't update when the user's sound scheme is changed.
What I eventually did:
Instead of playing a system sound, I embedded a wav file into the application as a resource, and played it with System.Media.SoundPlayer