Stop Wav
Jeg har lavet en knap der afspiller en wav fil, men hvordan stopper jeg den igen (altså inden den er færdig)?Koden ser sådan ud:
Option Explicit
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Const SW_SHOWNORMAL = 1
Private Const SND_ASYNC = &H1
Private Const SND_NODEFAULT = &H2
Public Sub PlaySound(ByVal strPath As String)
sndPlaySound strPath, SND_ASYNC Or SND_NODEFAULT
End Sub
Call PlaySound(App.Path & "\blabla.wav")
