Export (0) Print
Expand All

How to: Play a System Sound from a Windows Form

The following code example plays the Exclamation system sound at run time. For more information about system sounds, see SystemSounds.

public void playExclamation()
{
    SystemSounds.Exclamation.Play();
}

This example requires:

Show:
© 2014 Microsoft