Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to play a specific windows error sound in c# [duplicate]

Possible Duplicate:
How to play a standard windows sound?

I want to play an windows error sound in my c# application when the user isn´t allowed to enter more characters into a text box. Is there a .net framework api or have i to play it from wave files and if, how do i do this?

like image 804
Paedow Avatar asked Oct 15 '12 23:10

Paedow


1 Answers

Check the System.Media.SystemSounds class. I believe SystemSounds.Hand.Play() should do the trick.

like image 144
Mihai Avatar answered Sep 21 '22 06:09

Mihai