How to: Play a Beep from a Windows Form
.NET Framework 4.6 and 4.5
This example plays a beep at run time.
public void onePing()
The sound played in the C# code sample is determined by the Beep system sound setting. For more information, see SystemSounds.