Private Declare Function SndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundname As String, ByVal uflags As Long) As Long Const SND_ASYNC = &H1
Dim retval As Long retval = SndPlaySound("c:\mysound.wav", SND_ASYNC)
Salut
Private Declare Function SndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundname As String, ByVal uflags As Long) As Long Const SND_LOOP = &H8 'loop the sound until next sndPlaySound Const SND_ASYNC = &H1 Const SND_SYNC = &H0 Dim retval As Long 'chemin :le path où se trouve le fichier wav retval = SndPlaySound(chemin,SND_SYNC) ou retval = SndPlaySound(chemin,SND_ASYNC)
27 août 2023 à 17:47
Nickel !