|
-
Dec 1st, 1999, 09:13 AM
#2
PowerPoster
Look through the BB archives, it's the kind of question that appears all the time. In reply, here is some code I got from Serge's post
Private Declare Function sndPlaySound Lib "WinMM.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Private Const SND_ASYNC = &H1
Private Const SND_NODEFAULT = &H2
Private Const SND_FLAG = SND_ASYNC Or SND_NODEFAULT
Public Sub PlayWav(pWavFile As String)
If Dir(pWavFile) <> "" Then
Call sndPlaySound(pWavFile, SND_FLAG)
End If
End Sub
Place this code on your button to play wav
PlayWav "C:\Mysound.wav"
If your looking for a console-based player (with buttons and length etc), use the Windows Media Player control.
Regards,
------------------
- Chris
[email protected]
If it ain't broke - don't fix it 
[This message has been edited by chrisjk (edited 12-01-1999).]
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
|