Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
API Call to ring system bell/play .WAV?
Message
De
28/08/1999 02:36:20
Al Doman (En ligne)
M3 Enterprises Inc.
North Vancouver, Colombie Britannique, Canada
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
API Call to ring system bell/play .WAV?
Divers
Thread ID:
00258772
Message ID:
00258772
Vues:
76
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform