Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Chr(7) and the PC Speaker
Message
De
15/01/2003 13:37:16
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00742016
Message ID:
00742037
Vues:
20
This message has been marked as the solution to the initial question of the thread.
>I need to have the PC beep a set of tones (The PC has no audio card/speakers).
>In the DOS version of the program I'm converting, I had this routine that worked well:
>
>procedure Tone
>parameters nFrequency,nDuration
>@ 0,0 say ""
>if empty(parameters())
>    set bell to 512,2    && no parameters - reset
>else
>    set bell to nFrequency,nDuration
>    ?? chr(7)
>endif
>
>
>Is there a way to force the output to the PC's internal speaker?
>
>TIA

I don't think you can if there's a sound card installed.

But maybe you can use the Beep API function instead:
DECLARE Beep IN WIN32API INTEGER nFrequency, INTEGER nDuration
Beep(1000,250)
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform