VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Play Wav Sound Files Using API's. (Visual Basic)

by Rajender Sharma (7 Submissions)
Category: Windows API Call/Explanation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 22nd November 1999
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Play Wav Sound Files Using API's. (Visual Basic)

API Declarations



Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

Public Const SND_ALIAS = &H10000 ' name is a WIN.INI [sounds] entry
Public Const SND_ASYNC = &H1 ' play asynchronously
Public Const SND_LOOP = &H8 ' loop the sound until next sndPlaySound
Public Const SND_NOWAIT = &H2000 ' don't wait if the driver is busy
Public Const SND_SYNC = &H0 ' play synchronously (default)



Rate Play Wav Sound Files Using API's. (Visual Basic)




public sub cmdPlaysoundClick()

dim ret as long
ret=sndplaysound("c:\windows\bee.wav",SND_SYNC)

End Sub


Download this snippet    Add to My Saved Code

Play Wav Sound Files Using API's. (Visual Basic) Comments

No comments have been posted about Play Wav Sound Files Using API's. (Visual Basic). Why not be the first to post a comment about Play Wav Sound Files Using API's. (Visual Basic).

Post your comment

Subject:
Message:
0/1000 characters