gpt4 book ai didi

c# - 打开表单时,如何使WAV文件在后台播放?

转载 作者:行者123 更新时间:2023-12-03 02:34:07 24 4
gpt4 key购买 nike

我希望打开wav文件时可以在窗体的背景中播放。我该怎么做呢?

最佳答案

要播放文件时,将以下代码添加到事件中:

     var player = new System.Media.SoundPlayer();
player.SoundLocation = @"D:\.....\some file.wav";
player.Load();
player.Play();

关于c# - 打开表单时,如何使WAV文件在后台播放?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24221432/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com