I want to play some windows standard sound as an error alarm.
How do it using C#?
Thanks.
Printable View
I want to play some windows standard sound as an error alarm.
How do it using C#?
Thanks.
Hm, I don't think there is a way built in .NET, but, for example
can be used. You can do likewise for Beep in the SDK, if all you want is a ... beep.Code:[DllImport("winmm.dll")]
public static extern long PlaySound(string lpszName, long hModule, long dwFlags);
Also, in .NET 2.0 you have Console.Beep() with one overload.
And then there is ofcourse Windows Media Player to use :-)
HTH!
It is really strange.
I hoped to find something as System. … .PlaySound…
but not
System.Diagnostics.Process.Start("ding.wav"); :sick:
do a little bit search in this forum, you will find answers