Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
How to: Play a System Sound from a Windows Form

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:

Community Additions

ADD
Show:
© 2015 Microsoft