jetest
Messages postés18Date d'inscriptionlundi 26 mai 2003StatutMembreDernière intervention 8 septembre 2004
-
14 juin 2003 à 01:32
ShareVB
Messages postés2676Date d'inscriptionvendredi 28 juin 2002StatutMembreDernière intervention13 janvier 2016
-
14 juin 2003 à 10:55
soir à tous
alors la je pige pas, bcp de source et pas bcp de vrai exemple sur l'arret d'un son !?
ShareVB
Messages postés2676Date d'inscriptionvendredi 28 juin 2002StatutMembreDernière intervention13 janvier 201626 14 juin 2003 à 10:55
salut
shell te renvoie un ID dans jouewav :
Private Declare Function TerminateProcess Lib "kernel32" (ByVal hProcess As Long, ByVal uExitCode As Long) As Long
Private Declare Function OpenProcess Lib "Kernel32.dll" (ByVal dwDesiredAccessas As Long, ByVal bInheritHandle As Long, ByVal dwProcId As Long) As Long
Private Sub KillProgram(ProcessId As Long)
Dim ProcessHandle As Long
Const PROCESS_TERMINATE = 1
ProcessHandle = OpenProcess(PROCESS_TERMINATE, False, ProcessId)
TerminateProcess ProcessHandle, 4
End Sub
Private Sub Form_Load()
Dim jouewav As Long, monwav As String
monwav = Dir1.Path & "" & File1.FileName
jouewav = Shell("sndrec32 /play " & monwav, vbHide)
KillProgram jouewav
End Sub