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!

Play Sound File

Status
Not open for further replies.

WCSO

Programmer
Nov 7, 2005
25
US
I have a form with a timer event that runs the following code:
SET BELL TO thatplace+'\Settings\_CSRAlert.wav'
? CHR(7)
SET BELL TO

thatplace is a data location.
When I run this form from within FoxPro, the sound plays.
When I run this form from the executable, I get no sound and no error. I have run this form both ways on the same machine. Any help would be appreciated.
 
The '?' is essentially executing asynchronously. The program does not wait for the sound file to finish playing before proceeding to the next line of code. If the next line terminates the program, the program might end before the sound file starts to play.

Try putting
Code:
wait window "" timeout 5
right after the '?' to see if that helps.

Mike Krausnick
Dublin, California
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top