最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
用Api函数播放wav文件
时间:2022-07-02 11:41:29 编辑:袖梨 来源:一聚教程网
这个是一段例程,希望能对你有帮助
[DllImport("Winmm")]
public static extern bool PlaySound(string pszSound, IntPtr hmod, UInt32
fdwSound);
private const Int32 SND_ASYNC = 1;
private const Int32 SND_LOOP = 8;
private const Int32 SND_FILENAME = 131072;
private void PlayScreenSaver()
{
PlaySound ("BackGround.WAV", IntPtr.Zero, SND_ASYNC | SND_FILENAME |
SND_LOOP);
……
}
private void StopScreenSaver()
{
PlaySound (null, IntPtr.Zero, SND_ASYNC);
……
}
更详细的信息可以到这里看看
http://msdn.mi*cro*s*oft.com/library/default.asp?url=/library/en-us/multimed/mmfunc_9uxw.asp
[DllImport("Winmm")]
public static extern bool PlaySound(string pszSound, IntPtr hmod, UInt32
fdwSound);
private const Int32 SND_ASYNC = 1;
private const Int32 SND_LOOP = 8;
private const Int32 SND_FILENAME = 131072;
private void PlayScreenSaver()
{
PlaySound ("BackGround.WAV", IntPtr.Zero, SND_ASYNC | SND_FILENAME |
SND_LOOP);
……
}
private void StopScreenSaver()
{
PlaySound (null, IntPtr.Zero, SND_ASYNC);
……
}
更详细的信息可以到这里看看
http://msdn.mi*cro*s*oft.com/library/default.asp?url=/library/en-us/multimed/mmfunc_9uxw.asp
相关文章
- dnf幽暗岛奖励大全 幽暗岛奖励掉落有哪些 11-30
- dnf第6套天空套幻魅外观大全 第6期稀有装扮幻魅外观汇总 11-30
- dnf撕碎的衣角怎么获得 撕碎的衣角掉落地图介绍 11-30
- dnf铭刻在迷雾中的足迹隐藏任务触发条件攻略 铭刻足迹于迷雾中者声誉获得方法 11-30
- dnf阿拉德萌动小兽通行券宠物属性介绍 11-30
- dnf阿拉德萌动小兽通行券全奖励内容及价格一览 11-30