|
-
May 21st, 2001, 02:42 PM
#1
Playing Audio Files
Hello,
What do you have to do so that an audio file (ie wave) is played when a command is clicked?
Thanks in advance for the help.
--yellowTIGER--
-
May 21st, 2001, 10:29 PM
#2
Re: Playing Audio Files
Try This
Put this at the top of your code
Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal _ '(end of first line)
'Below goes on one line
lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long
'Put below in your code
Private Sub Command1_Click()
'Below goes on one line
retVal = PlaySound("C:\WINDOWS\MEDIA\The Microsoft Sound.Wav", 0&, &H20000)
End Sub
73 RSH
You can substitute the name of any wave file in above. this one I believe is the windows welcome sound.
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
|