C#中播放声音文件
2010-07-09 10:08
225 查看
//播放声音文件 [DllImport("winmm.dll", EntryPoint = "PlaySound")] private static extern bool PlaySound(string pszSound, IntPtr hmod, uint fdwSound); //调用此函数 public void gosound() { string strPath = AppDomain.CurrentDomain.SetupInformation.ApplicationBase; strPath = strPath + "//Music//ring.mp3"; //为声音文件所在路径 PlaySound(strPath, IntPtr.Zero, 0); }
相关文章推荐
- 用C#播放声音文件
- C#编写Windows桌面应用程序播放MP3声音文件
- C#播放声音的两个方法 + 流读写文件
- 使用wmp控件连续播放多个声音文件的代码(计算机报时程序C#)
- c#播放声音文件
- 用C#播放声音文件
- c#播放声音文件
- c#播放声音文件
- C#播放资源文件中的声音
- c#播放声音文件
- 【原】C#播放WAV声音文件/C# SoundPlayer应用
- android播放avi文件时有声音无图像
- Android利用Mediapalyer播放本地资源文件声音
- 播放ogg声音文件
- C#中如何控制播放音乐的声音大小
- 【已解决】C#中调用资源管理器(Explorer.exe)打开指定文件夹 + 并选中指定文件 + 调用(系统默认的播放类)软件(如WMP)打开(播放歌曲等)文件
- C#播放声音的四种方法
- 使用DirectShow進行播放多媒體文件(C#)
- C#中用API实现MP3等音频文件的播放类
- MFC播放声音文件