Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
API Call to ring system bell/play .WAV?
Message
From
28/08/1999 02:36:20
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
API Call to ring system bell/play .WAV?
Miscellaneous
Thread ID:
00258772
Message ID:
00258772
Views:
75
I need to be able to play .WAV files in my VFP 5 app. The combination of SET BELL TO "MySound.WAV", 0 and ??CHR(7) works perfectly at the VFP command window, but not within my app (based on Visual FoxExpress 5). No errors come up, the sound simply doesn't play.

According to earlier threads, the problem may be in trying to use ??CHR(7) when a control incapable of accepting streaming output has the focus. As a workaround, Mark McCasland kindly posted an API call that reliably rings the bell. However, its "repertoire" seems to be limited to the Windows system sounds (e.g. DING.WAV), and it ignores the current VFP SET BELL setting.

Is there another API call that could accept a .WAV file to play as a parameters? Or, can anyone think of a workaround? I think I'd prefer the API route if at all possible, because the .WAV files are called from a form method that is in turn called by a timer TimerEvent(), so I can't ever be sure which control will have the focus.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Next
Reply
Map
View

Click here to load this message in the networking platform