//API功能 Beep參考、設定
[DllImport("kernel32.dll")]
private static extern int Beep(int dwFreq, int dwDuration);
public enum Music
{
Do = 523,
Re = 587,
Mi = 659,
Fa = 698,
So = 784,
La = 880,
Ti = 988,
Do2 = 1046
};
/// <summary>
/// Beep事件
/// </summary>
private void Beep()
{
Beep((int)Music.Do, 300);
Beep((int)Music.Re, 300);
Beep((int)Music.Mi, 300);
Beep((int)Music.Fa, 300);
Beep((int)Music.So, 300);
Beep((int)Music.La, 300);
Beep((int)Music.Ti, 300);
Beep((int)Music.Do2, 300);
}
沒有留言:
張貼留言