mikeycorn

Re: What the hell am I doing wrong...

Code:
'don't know about Meg's code 
'but my code works fine
' 
'API Function to play the sound 
' 
Public Declare Function sndPlaySound Lib "winmm" Alias _ 
"sndPlaySoundA" (ByVal lpszSoundName As String, _ 
ByVal uFlags As Long) As Long 
' 
' play synchronously (default) 
Public Const SND_SYNC = &H0 
' play asynchronously 
Public Const SND_ASYNC = &H1 
' loop the sound until next 
Public Const SND_LOOP = &H8 

Private Sub Command1_Click() 

Call sndPlaySound(ByVal "c:\yourfolder\yourfile.mid", SND_ASYNC) 

End Sub 

Private Sub Command2_Click() 
Call sndPlaySound(0,0)  
End Sub