by Jonh Kevin (2 Submissions)
Category: Sound/MP3
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 10th September 2008
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Play Wav Files and Others By Clicking a Command Button (Fixed)
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
sndPlay App.Path & "Hello.wav", SND_ASYNC Or SND_NODEFAULT
'Use Your Own Music File And Put The Inside Te Folder Where The Application is
'This Is The Correct Code