How many ways to Beep and Make Noise in .NET and C#
At the PADNUG meeting last night the question (Lord knows why this always comes up :) on how to make the system "beep" was asked. Here's two kinds of beeps, and links to some source.
The "PC Beep," including frequency and duration:
public static extern bool Beep(int freq,int duration);
public static void Main(string args)
The considerably more interesting "MessageBeep" (via BradA) that uses the Wav files that are configured in the Sounds Control Panel.
public enum MessageBeepType
Default = -1,
Ok = 0x00000000,
Error = 0x00000010,
Question = 0x00000020,
Warning = 0x00000030,
Information = 0x00000040,
public static extern bool MessageBeep(