Play tune through internal speaker

homer2002

Registered User.
Local time
Today, 22:17
Joined
Aug 27, 2002
Messages
152
Here a change

Can anyone play a .MID file or somthing thru the INTERNAL speaker?

I fancy annoying my boss by playing stupid tunes at him while he uses a database I designed.
 
Code:
    Dim boo As Boolean
    Do While Not boo
        Beep
    Loop

Sorry, only tune I know.
 
Try will play wave files...
Code:
Option Compare Database
Option Explicit
  
'PlayWaveFile
Declare Function apisndPlaySound Lib "winmm" Alias "sndPlaySoundA" (ByVal filename As String, ByVal snd_async As Long) As Long
    
Public Function PlayWaveFile(sWavFile As String)
    
    If apisndPlaySound(sWavFile, 1) = 0 Then
        'MsgBox "The Sound Did Not Play!"
    End If
    
End Function
    
Public Sub PlayWaveFile_Cord()
    
    Call PlayWaveFile("C:\Windows\Media\chord.wav")
    
End Sub
HTH
 

Users who are viewing this thread

Back
Top Bottom