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" 音频文件名称
标签:SoundPlayer,C#,rm,音频文件,sndplayr,器中,new,Properties,Resources 来源: https://www.cnblogs.com/Fpack/p/15195984.html