VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



VB3 - Play a WAV file in Visual Basic 3.0

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



Rate VB3 - Play a WAV file in Visual Basic 3.0



'Replace the path with your wave file(s)

playwav "c:\windows\media\chimes.wav"

Download this snippet    Add to My Saved Code

VB3 - Play a WAV file in Visual Basic 3.0 Comments

No comments have been posted about VB3 - Play a WAV file in Visual Basic 3.0. Why not be the first to post a comment about VB3 - Play a WAV file in Visual Basic 3.0.

Post your comment

Subject:
Message:
0/1000 characters