OVH Cloud OVH Cloud

Sons

1 réponse
Avatar
christian
Bonjours ,
Je n'arrivent pas a mettre un sons en automatique ( aulieu de cliquez deux
fois dessu est t-il possible qu'il se lance sans rien faire) ? merci

1 réponse

Avatar
ng
Salut,

Je n'arrivent pas a mettre un sons en automatique ( aulieu de cliquez deux
fois dessu est t-il possible qu'il se lance sans rien faire) ? merci



Tu veux jouer un wav en VB ?
Si oui regarde l'API 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 Const SND_ASYNC = &H1
Private Const SND_NODEFAULT = &H2

Exemple de procédure pour jouer un wav (chemin en paramètre) :

Public Sub JoueWAV(sFichier As String)
Call PlaySound(sFichier, ByVal 0&, SND_ASYNC Or SND_NODEFAULT)
End Sub

--
Nicolas G.
FAQ VB : http://faq.vb.free.fr
API Guide : http://www.allapi.net
Google Groups : http://groups.google.fr/
MZ-Tools : http://www.mztools.com/