This is a visual basic 6.0 wav sound player class that plays any selected sound file in .wav format. It has the filename property to select the file and play property to play the sound file. Visit http://www.mycplus.com for more codes.
This is a visual basic 6.0 wav sound player class that plays any selected sound file in .wav format. It has the filename property to select the file and play property to play the sound file.
Option Explicit
Private mfilename As String
Private mflags As Long
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Public Property Get filename() As String
filename = mfilename
End Property
Public Property Let filename(ByVal vnewvalue As String)
mfilename = vnewvalue
End Property
Public Property Get flags() As Long
flags = mflags
End Property
Public Property Let flags(ByVal vnewvalue As Long)
mflags = vnewvalue
End Property
Public Sub play()
Dim rc As Long
rc = sndPlaySound(mfilename, mflags)
End Sub
karthik_02 0 Newbie Poster
msaqib -3 Junior Poster in Training
mankind33 0 Newbie Poster
surajcrj 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.