[Mono-list] System.Media.SystemSounds

Dan Shryock dan.shryock at gmail.com
Wed Dec 3 13:14:14 EST 2008


On Tue, Dec 2, 2008 at 3:58 PM, Petit Eric <surfzoid at gmail.com> wrote:
> Is System.Media.SystemSounds.Exclamation.Play(); suposed to work under linux ?

Using this code on mono 1.9.1 on opensuse 10.3, each of the sounds
plays and prints its name without any problems for me. HTH

Dan



var sounds = new[]{
	new{Name="Asterisk",Sound=System.Media.SystemSounds.Asterisk},
	new{Name="Beep",Sound=System.Media.SystemSounds.Beep},
	new{Name="Exclamation",Sound=System.Media.SystemSounds.Exclamation},
	new{Name="Hand",Sound=System.Media.SystemSounds.Hand},
	new{Name="Question",Sound=System.Media.SystemSounds.Question}
};

foreach(var entry in sounds){
	Console.WriteLine(entry.Name);
	entry.Sound.Play();
	System.Threading.Thread.Sleep(3000);
}


More information about the Mono-list mailing list