请教高手,在VB中能不能加入音乐?
我是学生,今年刚学VB,我想做一个带按键音的计算器,谢谢大家! --------------------编程问答-------------------- 可以的用beep就行,还不需要声卡和外接声音设备的支持
--------------------编程问答--------------------
Option Explicit
Private Declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long
Private Sub Form_Load()
Beep 4400, 100 '4400是频率(Hz),100是时长(ms)
End Sub
--------------------编程问答--------------------
--------------------编程问答-------------------- 才发现是重复贴,早知道就不回了....
'播放wav
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" ( _
ByVal lpszSoundName As String, ByVal uFlags As Long _
) As Long
Const SND_ASYNC = &H1
Const SND_NODEFAULT = &H2
'调用
Call sndPlaySound(App.Path & "\001.wav", SND_ASYNC Or SND_NODEFAULT)
补充:VB , 多媒体