Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Jean Peter Paredes
  Where is Jean Peter Paredes?
 Davao
 Philippines
 Jean Peter Paredes
 To: chaim dudi
  Where is chaim dudi?
 Jerusalem
 South Carolina - Israel
 chaim dudi
 Tags
Subject: RE: play/stop sound
Thread ID: 349548 Message ID: 395730 # Views: 44 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: General VFP Topics
Date: Friday, January 17, 2014 6:20:45 PM         
   


> Hi,
>
> I can play sound by PlaySound (api) or by vfp:
>
SET BELL TO "c:\VF\right2.wav"
> ? chr(7)
> SET BELL TO

>
> How can I stop in the middle?
>
> Thank you

Hello... i would suggest playing a shorter sound. i do use SET BELL for playing sounds
because its simple and does not cause too much windows fatal/illegal errors but when playing
long wav sounds it plays till the end.

Example..

* Play long sound
SET BELL TO sys(5)+sys(2003)+"\Sound\longsound.wav"
?? CHR(7)
SET BELL TO

* End the sound by playing a shorter sound
SET BELL TO (ADDBS(GETENV('windir')))+"MEDIA\DING.WAV"
?? CHR(7)
SET BELL TO

Basic is the Foundation of All things Complex
- Peter

ENTIRE THREAD

play/stop sound Posted by chaim dudi @ 7/16/2012 11:40:25 AM
RE: play/stop sound Posted by Mike Gagnon @ 7/16/2012 12:38:59 PM
RE: play/stop sound Posted by Jean Peter Paredes @ 1/17/2014 6:20:45 PM