How to Play a Wave File in VB6
With wave (.WAV) files, you can create voice responses and other audio interaction in your program. Playing wave files in your program is easy, as demonstrated here.
Module
Option Explicit
Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Usage
Option Explicit
Private Sub Command1_Click()
sndPlaySound "C:\WINDOWS\MEDIA\Start.wav", &H1
End Sub
Special Instructions
This code originally appeared on AndreaVB.com, and has been republished here with the permission of Andrea Tincani.
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.