Ver Mensaje Individual
  #3 (permalink)  
Antiguo 13/09/2009, 13:34
hunter18
 
Fecha de Ingreso: junio-2008
Mensajes: 343
Antigüedad: 16 años, 10 meses
Puntos: 4
Respuesta: Reproducir sonidos en vb6

Yo tengo este ejemplo y me funciona bien
Código:
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Private Declare Function mciExecute Lib "winmm.dll" (ByVal lpstrCommand As String) As Long

Private Sub Command1_Click()
Dim sPath As String
Dim lRet As Long
sPath = Chr(34) & App.Path + "\puk.wav" & Chr(34)
lRet = mciSendString("OPEN " & sPath, 0&, 0, 0)
lRet = mciSendString("PLAY " & sPath & " FROM 0", 0&, 0, 0)
End Sub
saludos