بسم الله الرحمن الرحيم
درس تشغيل الصوت في أي حدث ترغبه.
لتشغيل اي ملف صوت في أي حدث فقط ضع الكود التالي في ذلك الحدث
=PlaySound("C:\WINDOWS\MEDIA\CHIMES.WAV")مع العلم بتحديد مكان ملف الصوت بدقه .
ثم قم بانشاء تعريف جديد للوظيفة ( PlaySound ) كما يلي :
انسخ الكود التالي ثم الصقه في وحده نمطيه جديده
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 " لم يعمل الصوت المحدد ... تأكد من العنوان الصحيح لملف الصوت " End If End Function
----------------------


