Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making Sound 1

Status
Not open for further replies.

Haheehi

Programmer
Sep 4, 2000
28
SG
How do I use the speaker to play sound? [sig][/sig]
 
In the Win32 API there is a Beep function that lets you specify the frequency and duration of the sound. Hope that's what you're looking for. Here's the function declaration:

Public Declare Function Beep Lib "kernel32" Alias "Beep" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long

Hope that helps

Joe [sig][/sig]
 
This is not wat I want.
Actually, I want to ask how to play any music.
Like in a mp3 player or wav Player [sig][/sig]
 
use the 'shell' command to call the file that you want, say
Shell C:\Music\NextEpisode.mp3 The file will be played using the default player for that type of file

Joe [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top