cs_Willi
Messages postés2375Date d'inscriptionjeudi 12 juillet 2001StatutModérateurDernière intervention15 décembre 201822 10 févr. 2006 à 01:53
Sa devient énervant, BONJOUR ET UN MERCI n'aurait pas été de trop !!!
Et évite le langage SMS la prochaine fois
Met le code suivant dans ta feuille:
Private Const SND_ASYNC = &H1 'Joue le son en arrière-plan.
Private Const SND_FILENAME = &H20000 'Le son provient d'un fichier externe
Private Const SND_LOOP = &H8 ' Répète le son jusqu'au prochain appel de PlaySound
Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long
Private Sub Form_Load()
'Joue en boucle ton fichier wav
PlaySound "C:\WINDOWS\MEDIA\TADA.WAV", ByVal 0&, SND_FILENAME Or SND_ASYNC Or SND_LOOP
End Sub
Private Sub Form_Unload(Cancel As Integer)
'Arrete de jouer
PlaySound vbNullString, ByVal 0&, SND_PURGE