Skip to content

Latest commit

 

History

History
54 lines (36 loc) · 1.37 KB

File metadata and controls

54 lines (36 loc) · 1.37 KB

Home

Function name : Beep

Group: Error Handling - Library: kernel32


Generates simple tones on the speaker. The function is synchronous; it does not return control to its caller until the sound finishes.


Code examples:

Using Beep and Sleep functions to make the old tin buzz sing (WinNT only?)
Controlling master audio volume by sending WM_APPCOMMAND messages

Declaration:

BOOL Beep(
  DWORD dwFreq,      // sound frequency
  DWORD dwDuration   // sound duration
);  

FoxPro declaration:

DECLARE INTEGER Beep IN kernel32;
	INTEGER dwFreq,;
	INTEGER dwDuration
  

Parameters:

dwFreq [in] Specifies the frequency, in hertz, of the sound.

dwDuration [in] Specifies the duration, in milliseconds, of the sound.


Return value:

If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.


Comments:

Windows 95/98/Me: On computers with a sound card, the function plays the default sound event. On computers without a sound card, the function plays the standard system beep. I"ve never seen such computer in years.