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
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/
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
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/
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/