How to: Play a System Sound from a Windows Form
.NET Framework 3.0
The following code example plays the Exclamation system sound at run time. For more information about system sounds, see.
Compiling the Code
This example requires:
A reference to thenamespace.