by Raghu (22 Submissions)
Category: Sound/MP3
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 12th May 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Simple Code To Play a Wave File
API Declarations
'BY S.Raghunathan
'Declarations
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Dim fileName as String
Sub PlayWave()
fileName = "C:\Windows\Media\MicrosoftSound.Wav"
sndPlaySound fileName,0
End Sub()