try this,
VB Code:
Option Explicit Private Const SND_ASYNC As Long = &H1 Private Const SND_MEMORY As Long = &H4 Private Const SND_NODEFAULT = &H2 Private Const Flags& = SND_ASYNC Or SND_NODEFAULT Or SND_MEMORY Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, _ ByVal uFlags As Long) As Long Private Sub Command1_Click() Dim b As String b = StrConv(LoadResData(101, "custom"), vbUnicode) sndPlaySound b, Flags& End Sub




Reply With Quote