|
-
May 8th, 2001, 10:22 AM
#1
Wav Files
Can someone share the necessary code for playing the sound files included with windows when one hits like a command button. One button for each file would be fine.
73 RSH
-
May 25th, 2001, 09:58 PM
#2
Re: Wav Files
Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Public Const SND_sYNC = &H0
Public Const SND_aSYNC = &H1
Public Const SND_NODEFAULT = &H2
Public Const SND_MEMORY = &H4
Public Const SND_LOOP = &H8
Public Const SND_NOSTOP = &H10
Call this sub each time you click on a command button
Sub PlaySoundClick()
Dim X As Long
Dim wFlag As Integer
Dim SoundName As String
wFlag = SND_aSYNC Or SND_NODEFAULT
X = sndPlaySound("C:\Archive\sound1.tmp", wFlag)
End Sub
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
|