Hello,
So i am building a DB for my work and i am having alot of fun with it today and showing my geek/nerd side and putting a few sounds to give it some flair, however i think it might be a good idea if the users can mute the sounds. what i have is a module with my sounds and then call fuctions where i want it to play, i have looked around but can't seem to find a way to mute, i was hoping for a button i could put on my login form to mute the sounds. Thanks for any help, below is the module code i use.
Option Compare Database
'*****************************************************************
'Declarations section of the module.
'*****************************************************************
Declare Function apisndPlaySound Lib "winmm" Alias "sndPlaySoundA" (ByVal Filename As String, ByVal snd_async As Long) As Long
Public Function playwavefile(sWavFile As String)
'Purpose: Plays a sound.
'Argument: the fu11 path and file name.
If apisndPlaySound(sWavFile, 1) = 0 Then
MsgBox "The Sound Did Not Play!"
End If
End Function
'On Open of Navigation From
Public Sub PlayWaveFile_Cord()
Call playwavefile("G:\CLO Shared\CAL_DB\CAL Sounds\Goodmorning.wav")
End Sub
So i am building a DB for my work and i am having alot of fun with it today and showing my geek/nerd side and putting a few sounds to give it some flair, however i think it might be a good idea if the users can mute the sounds. what i have is a module with my sounds and then call fuctions where i want it to play, i have looked around but can't seem to find a way to mute, i was hoping for a button i could put on my login form to mute the sounds. Thanks for any help, below is the module code i use.
Option Compare Database
'*****************************************************************
'Declarations section of the module.
'*****************************************************************
Declare Function apisndPlaySound Lib "winmm" Alias "sndPlaySoundA" (ByVal Filename As String, ByVal snd_async As Long) As Long
Public Function playwavefile(sWavFile As String)
'Purpose: Plays a sound.
'Argument: the fu11 path and file name.
If apisndPlaySound(sWavFile, 1) = 0 Then
MsgBox "The Sound Did Not Play!"
End If
End Function
'On Open of Navigation From
Public Sub PlayWaveFile_Cord()
Call playwavefile("G:\CLO Shared\CAL_DB\CAL Sounds\Goodmorning.wav")
End Sub