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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Generating Beeps

Status
Not open for further replies.

asm338s

Programmer
Jul 16, 2001
135
US
Is it possible to produce beeps when there is a warning message displayed in the program?
 
This depends on what OS, whether the system has a sound card, and whether you are refering to warnings your application or VFP generates. Try:

Declare long Beep IN WIN32API AS myBeep ;
long dwFreq, long dwDuration

myBeep(1500,100)
myBeep(1500,1000)
myBeep(2000,100)
myBeep(500,100)

Rick

 
Using MESSAGEBOX() or ??CHR(7) will work. CHR(7) will make a beep on the pc speaker if you don't have external speakers. MESSAGEBOX() uses the Window's sounds:

MESSAGEBOX("Error occurred", 16, "Notice")

or

??CHR(7)
WAIT WINDOW 'Error occurred' TIMEOUT 5

Dave S.
 
and you can also change the "beep" to any .wav files that you want with
SET BELL TO "filename.wav"..
then use
SET BELL TO
to get the default beep back..

have fun!
-- michael~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top