Sounds in VB

I wanted to know how to make beep sounds and control the frequency in VB, without using the Beep API from kernel32. If anyone knows how to do this, i would appriciate help. I would also accept any answer that could refer me to a site with all the sounds of a keyboard, hopefully .wav files. Thanks :)
Who is Participating?
diossitoConnect With a Mentor Commented:
In a module put that:

Declare Function mciExecute Lib "winmm.dll" (ByVal lpstrCommand As String) As Long

In a procedure, put that (an example for a command button)

Private Sub Command1_click()
Dim iResp As Integer       ' to get the response
   Dim sArchivo As String  ' to get the name of the file
   sArchivo = "Play " & App.Path & "\trumpet1.wav"   'we suggest what the file is in the same folder of the program
    iResp = mciExecute(sArchivo)
End Sub

I know what that works with .wav files.
I hope you find this useful.-
Chuckie_IceAuthor Commented:
well, it didnt work on my computer, but it worked on XP, sorry
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.