C#调用资源管理器中的音频文件
首先:加载所需DLL
[DllImport("winmm.dll")]
ResourceManager rm = new ResourceManager("IT6831A.Properties.Resources", Assembly.GetExecutingAssembly()); SoundPlayer sndplayr = new SoundPlayer(rm.GetStream("_13203")); sndplayr.Play();
"IT6831A.Properties.Resources" :资源管理器路径
"_13203" 音频文件名称