vb 用playsound播放的背景音乐,只放一次,能不能让它循环播放啊
1个回答
展开全部
'/*声明API及常量*/
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" ( _
ByVal lpszSoundName As String, _
ByVal uFlags As Long) As Long
'循环播放常量
Private Const SND_LOOP = &H8
'/*定义通用过程*/
Private Sub PlayWav(sFileName As String)
Call sndPlaySound(sFileName, SND_LOOP)
End Sub
'/*调用示例*/
Private Sub Command1_Click()
PlayWav ("C:\WINDOWS\Media\ding.wav")
End Sub
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" ( _
ByVal lpszSoundName As String, _
ByVal uFlags As Long) As Long
'循环播放常量
Private Const SND_LOOP = &H8
'/*定义通用过程*/
Private Sub PlayWav(sFileName As String)
Call sndPlaySound(sFileName, SND_LOOP)
End Sub
'/*调用示例*/
Private Sub Command1_Click()
PlayWav ("C:\WINDOWS\Media\ding.wav")
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询