VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Play .wav files using VB

by EM Dixson (6 Submissions)
Category: Miscellaneous
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Date Added: Wed 3rd February 2021
Rating: (4 Votes)

Play WAV files using VB ~ awesome ~ Add sound to your projects!
by: EM Dixson
https://developer.ecorp.net
HUNDREDS
of FREE Visual Basic Source Code Samples, Snippets, Projects and MORE!

Inputs
NA
Assumes
NA
Code Returns
NA
Side Effects
NA
API Declarations
NA

Rate Play .wav files using VB

***************************************************************
*         http://developer.ecorp.net         *
***************************************************************

Auhor: EM Dixson
This code shows how to play a wave file from VB.
Call the sub like this:
  PlaySound "C:\MyFolder\MySound.wav"
Note that if the file is not found the windows default sound 
will be played instead.

Paste the following code into a module:
'//*********************************//'
Public Declare Function sndPlaySound Lib "winmm" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Public Sub PlaySound(strFileName As String)
  sndPlaySound strFileName, 1
End Sub

Download this snippet    Add to My Saved Code

Play .wav files using VB Comments

No comments have been posted about Play .wav files using VB. Why not be the first to post a comment about Play .wav files using VB.

Post your comment

Subject:
Message:
0/1000 characters