C#调用声音函数(PlaySound,Beep,MessageBeep等)
来源:互联网 发布:淘宝网怎么改密码找回 编辑:程序博客网 时间:2024/05/16 07:33
<一>Visual Basic Beep()
1.使用Visual Basic Beep函数;添加引用 Miscorsoft Visual Basic Runtime
2.调用 Interaction.Beep();
<二>使用MessageBeep(unit uType):需添加 using System.Runtime.InteropServices;
public const int MB_ICONEXCLAMATION = 48;
[DllImport("user32.dll")]
public static extern bool MessageBeep(uint uType);
MessageBeep( MB_ICONEXCLAMATION );
<三>调用Beep(Int freq,int duration)函数
[DllImport("kernel32.dll")]
public static extern bool Beep(int freq,int duration);
Beep(800,300);
<四>调用PlaySound(string pszSound,int hmod,int fdwSound)
[DllImport("winmm.dll")]
public static extern bool PlaySound(string pszSound,int hmod,int fdwSound);
public const int SND_FILENAME = 0x00020000;
public const int SND_ASYNC = 0x0001;
PlaySound("提示时奏幻想空间.WAV",0,SND_ASYNC|SND_FILENAME);
- C#调用声音函数(PlaySound,Beep,MessageBeep等)
- C#调用声音函数(PlaySound,Beep,MessageBeep等)
- WinCE平台的C#程序中调用MessageBeep发出一些系统自带的声音,而不用使用playsound
- delphi报警声音 Beep、MessageBeep 和 Windows.Beep
- delphi报警声音 Beep、MessageBeep 和 Windows.Beep
- VC++程序中加入自定义声音(PlaySound函数用法)
- MessageBeep sndPlaySound PlaySound 音频播放
- 关于 Beep、MessageBeep 和 Windows.Beep
- 关于 Beep、MessageBeep 和 Windows.Beep
- MessageBeep函数
- 关于C#中调用Beep()
- PlaySound(WIN32 播放WAV声音)
- 实验: MessageBeep和Beep的区别
- 去除VMWare Beep(VMWare 声音|嘟)
- C# 使用PlaySound在移动设备上播放声音
- VC播放声音函数PlaySound和sndPlaySound的用法
- VC播放声音函数PlaySound和sndPlaySound的用法
- vc播放声音函数PlaySound和sndPlaySound的用法
- 不使用光盘在新的硬盘上安装Win2000 或xp
- 修改tomcat默认目录
- 笔记二
- 修改tomcat默认目录
- 深入研究 STL Deque 容器
- C#调用声音函数(PlaySound,Beep,MessageBeep等)
- IIS操作类
- Windows自启动程序十大藏身之所
- net] asp.net2.0的中国农历日期类
- 我在你记忆中的印象是什么样的?
- 如何连接判断字符新方法,如:where id0 and username="" and ......2006-6-8-3
- 未来的火影-sand_of_Sitsang出场
- PHP 正则表达式资料
- 设置emacs的默认字体