Click to See Complete Forum and Search --> : play a sound file??
Anjari
Feb 28th, 2003, 07:03 PM
How do I play a sound file in my program??
Simple I am sure...
Please be detailed...
Thanks,
Anjari
Lethal
Feb 28th, 2003, 07:21 PM
Through COM Interop, you could use the windows media player ocx component.
Anjari
Feb 28th, 2003, 07:44 PM
Hehe please explain a little more..
Anjari
JesusFreak
Feb 28th, 2003, 08:30 PM
Right Click the toolbox and select cosomize toolbox.
Click on the Com Components tab and scroll down to the bottom were it says "Windows Media Player".
Click the check box beside it and click ok.
At the bottom of the toolbox their sould now be the Windows Media Player control.
Static
Feb 28th, 2003, 09:38 PM
API will work too:
Private Declare Auto Function PlaySound Lib "winmm.dll" (ByVal ByVallpszSoundName As String, ByVal hModule As Integer, ByVal dwFlags As Integer) As Integer
SUB...etc
Dim pathtofile As String = "c:\test.wav"
Dim fileName As String = String.Concat(pathtofile)
Const SND_FILENAME As Integer = &H20000
PlaySound(fileName, 0, SND_FILENAME)
end sub
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.