Ciao,
devi usare la funzione api sndplaysound:
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Dopo averla dichiarata basta che nel codice click del pulsante che vuoi schiacciare metti ad esempio:
Private Sub Command1_Click()
Dim y As Long
y = sndPlaySound("percorso", 1)
End Sub
dove percorso è il percorso del file da eseguire.
|