ကွန်ပြူတာက နေ Alarm တစ်ခုခု အော်စေချင်ရင် သုံးတယ်...
Use Console.Beep
အောက်မှာ frequency အမျိုးမျိုးအတွက် အသံမျိုးစုံကို ထွက်ပြထားပါတယ် .. နားထောင်ကြည့်ပါ
using System;
class Program
{
static void Main()
{
// The official music of Dot Net Perls.
for (int i = 37; i <= 32767; i += 200)
{
Console.Beep(i, 100);
}
}
}
နောက်တစ်ခုကတော့ အဲဒီအသံလေးတွေကို ခြားခြားပီး အော်စေချင်ရင် .. Thread.Sleep(2000);
ကို သုံးပေးရပါမယ် .. သူက လုပ်လက်စ အလုပ်ကို ခဏ (၂ စက္ကန့်လောက်) ရပ်လိုက်တာပါ.. ဒါကို သုံးချင်ရင်တော့
using System.Threading; ကို အပ်ရပါမယ် ..
More info ->http://www.dotnetperls.com/beep
Subscribe to:
Post Comments (Atom)
Sunday, April 24, 2011
min that thant

Posted in 
No Response to "C# Beep Example"
Post a Comment