C#调用资源管理器中的音频文件
时间:2021-08-30 06:28:15
收藏:0
阅读:19
首先:加载所需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" 音频文件名称
原文:https://www.cnblogs.com/Fpack/p/15195984.html
评论(0)