Probleme de côtes...Playsound ?

Résolu
jiojioforever Messages postés 59 Date d'inscription samedi 14 mai 2005 Statut Membre Dernière intervention 30 mai 2006 - 7 mars 2006 à 17:13
jiojioforever Messages postés 59 Date d'inscription samedi 14 mai 2005 Statut Membre Dernière intervention 30 mai 2006 - 7 mars 2006 à 17:41
Salut j'ai un playsound de ce type mais je dois me tromper dans mes côtes quand je veux prendre le son selon un tableau

PlaySound (App.Path & "/Coq.wav"), ByVal 0&, SND_FILENAME Or SND_ASYNC

et voilà le code qui merde

PlaySound (App.Path & " " / " & TabDesSons(TabTemp(NumeroPage)) & " "&), ByVal 0&, SND_FILENAME Or SND_ASYNC

Merci d'avance j'ai essayé 100 posibilités ^^

2 réponses

mortalino Messages postés 6786 Date d'inscription vendredi 16 décembre 2005 Statut Membre Dernière intervention 21 décembre 2011 18
7 mars 2006 à 17:31
Salut,

Pour t'aider, moi j'ai un son qui est lancé dès qu'on clique sur un bouton.
Pour cela j'ai créé un Module

En déclaration :

Private Declare Function Playsound Lib "winmm.dll" _
Alias "PlaySoundA" (ByVal lpszName As String, _
ByVal hModule As Long, ByVal dwFlags As Long) As Long
__________________________________________________
Puis

Sub LireSon()
Const SND_SYNC = &H0
Const SND_ASYNC = &H1
Const SND_FILENAME = &H20000

FichierWav = "Nom.Du.Son.Wav"
FichierWav = ThisWorkBook.Path & "" & FichierWav
Call PlaySound(FichierWav , 0&, SND_SYNC Or SND_FILENAME)
End Sub

T'as plus qu'à l'adapté pour ton Prog

@+

Mortalino
3
jiojioforever Messages postés 59 Date d'inscription samedi 14 mai 2005 Statut Membre Dernière intervention 30 mai 2006
7 mars 2006 à 17:41
merci bien ça marche nikel

J'ai bidouillé ça :)

Call PlaySound((TabDesSons(TabTemp(NumeroPage))), ByVal 0&, SND_FILENAME)

Merci en tout cas :)
0
Rejoignez-nous