VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Play Wav Files and Others By Clicking a Command Button

by Jonh Kevin (2 Submissions)
Category: Sound/MP3
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 10th February 2008
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Play Wav Files and Others By Clicking a Command Button

API Declarations


Option Explicit
Private Declare Function sndPlay lib "winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Private Const SND_ASYNC = &H1
Private Const SND_SYNC = &H0
Private Const SND_LOOP = &H8
Private Const SND_NODEFAULT = &H1
Private Const SND_VALID = &H1F
Private Const SND_MEMORY = &H4
Private Const SND_PURGE = &H40

Rate Play Wav Files and Others By Clicking a Command Button



sndPlaySound App.Path & "Hello.wav", SND_ASYNC Or SND_NODEFAULT
'Use Your Own Music File And Put The Inside Te Folder Where The Application is

Download this snippet    Add to My Saved Code

Play Wav Files and Others By Clicking a Command Button Comments

No comments have been posted about Play Wav Files and Others By Clicking a Command Button. Why not be the first to post a comment about Play Wav Files and Others By Clicking a Command Button.

Post your comment

Subject:
Message:
0/1000 characters