|
-
Apr 22nd, 2001, 04:02 PM
#1
Thread Starter
Lively Member
i need to find a Simple way of playing audio on a form, how can this be done.......please help...i'll be playing a .wav file which will be very short like saying the word "help". thanks
-
Apr 22nd, 2001, 04:05 PM
#2
Monday Morning Lunatic
Do a search on this forum for "PlaySound", it's been answered many times before
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Apr 22nd, 2001, 04:07 PM
#3
Thread Starter
Lively Member
-
Apr 22nd, 2001, 04:09 PM
#4
Use the PlaySound API function.
Code:
Private Declare Function PlaySound _
Lib "winmm.dll" Alias "PlaySoundA" ( _
ByVal lpszName As String, _
ByVal hModule As Long, _
ByVal dwFlags As Long) As Long
Private Const SND_ASYNC = &H1
Private Const SND_FILENAME = &H20000
Public Sub PlayItSam(FileName As String)
PlaySound FileName, 0, SND_ASYNC + SND_FILENAME
End Sub
Public Sub StopThatNoice()
PlaySound vbNullString, 0, SND_ASYNC
End Sub
Best regards
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|