C#导入音频文件,找到Resources.resx,再进行导入。

直接添加文件到Resources是不能使用的。

 

解决的具体步骤:

【已解决】C#导入音频文件

 

【已解决】C#导入音频文件

 

 【已解决】C#导入音频文件

 

 

引用音频文件核心代码:

//播放背景音乐
SoundPlayer my_wave_file = new SoundPlayer(Properties.Resources.ClickNoise);
my_wave_file.Play();

 

注:如果导入的文件(例如图片、音频)想要清空,可以直接删除“Resources.resx”

 

谢谢观看!

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
  • 2021-12-31
  • 2022-12-23
  • 2021-08-06
  • 2021-12-07
  • 2022-12-23
猜你喜欢
  • 2021-09-12
  • 2022-02-19
  • 2021-07-17
  • 2021-04-09
  • 2021-12-04
  • 2021-06-26
  • 2021-10-02
相关资源
相似解决方案