You can also use P/Invoke to call Kernel32.dll!Be ep.
It takes two arguments, the first one the frequency, and the second
one the duration and returns a bool for success.
Frequency must be from 37 to 32,767.
something like:
using System.Runtime. InteropServices ;
public class whatever {
[DllImport("Kern el32.dll")]
public static extern bool Beep(UInt32 frequency, UInt32 duration);
public static void beepTime() {
Beep(1000, 300);
System.Threadin g.Thread.Sleep( 300);
Beep(2000, 400);
System.Threadin g.Thread.Sleep( 300);
Beep(500, 200);
System.Threadin g.Thread.Sleep( 300);
}
}
-mike
MVP
" #Hai" <Re**********@M ail.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Hi,
I want to throw out a series of 'beep..beep..be ep' to the speaker.
How to do that ?
Thanks