ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Windows 的各种声音

Windows 的各种声音

原创 Linux操作系统 作者:nklixiujun 时间:2009-02-09 18:29:21 0 删除 编辑

调用.Net库的System.Media.SystemSounds库的各种发声函数,发出系统自带的声音。

1、Beep: System.Media.SystemSounds.Beep.Play()

2、Hand: System.Media.SystemSounds.Hand.Play()

3、Asterisk: System.Media.SystemSounds.Asterisk.Play()

4、Question: System.Media.SystemSounds.Question.Play()

5、Exclamation: System.Media.SystemSounds.Exclamation.Play()

6、Console Beep: Console.Beep(int frequency, int duration);

7、SoundPlayer: 声明空间using System.Media;

SoundPlayer Mplayer = new SoundPlayer();
string filename = Application.StartupPath + "";
Mplayer.SoundLocation = filename;
Mplayer.Load();
Mplayer.PlaySync();

[@more@]

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/10897203/viewspace-1017077/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 我的处女篇
下一篇: A big lose or wealth?
请登录后发表评论 登录
全部评论
  • 博文量
    7
  • 访问量
    9371