by Genozide (1 Submission)
Category: Sound/MP3
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Originally Published: Sun 3rd June 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
VB3 - Play a WAV file in Visual Basic 3.0
API Declarations
'was taken from Gen0zide.bas, which was written by Gen0zide.
'This is extremely useful to play a .Wav file in Visual Basic 3.0
'Paste the code below here into a new module.
Declare Function SndPlaySound Lib "MMSystem" (ByVal lpWavName$, ByVal Flags%) As Integer
Sub playwav (file)
SoundName$ = file
wFlags% = SND_ASYNC Or SND_NODEFAULT
x% = SndPlaySound(SoundName$, wFlags%)
End Sub
'Replace the path with your wave file(s)
playwav "c:\windows\media\chimes.wav"