اضافة صوت للاكسس

21 فبراير 2019
1,006
0
0
قلب ابي
السلام عليكم ورحمة الله وبركاته


جميع الميديولات لا تعمل في الاكسس عندي لاضافة ملف صوتي للاكسس ليعمل عند فتح فورم او تشغيل زر او اي حدث من احداث الاكسس

برجاء الافاده

لا هذه الطريقة

Option Compare Database

Declare Function apisndPlaySound Lib "winmm" Alias "sndPlaySoundA" _
(ByVal filename As String, ByVal snd_async As Long) As Long

Function PlaySound(sWavFile As String)
' Purpose: Plays a sound.
' Argument: the full path and file name.

If apisndPlaySound(sWavFile, 1) = 0 Then
MsgBox "The Sound Did Not Play!"
End If
End Function
ولا هذه الطريقة

Option Compare Database


Const snd_async = (1)
Const SND_NODEFAULT = (2)

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

Public Sub API_PlaySound(pWavFile As String)

Dim LResult As Long

'Make a Windows API call to play a wav file
LResult = sndplaysound(pWavFile, SND_NODEFAULT + snd_async)

End Sub