VB背景音乐循环播放的问题
VB加入了背景音乐后,想让音乐循环播放,请问程序代码应该怎么样写
参考答案:使用API函数。
Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Public Const SND_LOOP = &H8
Public Const SND_ASYNC = &H1
Plays = sndPlaySound("123.wav", SND_LOOP Or SND_ASYNC)
你可以把以上“123.wav”文件换成其它文件(好象只支持WAV格式文件)