Microsoft KB Archive/95317

= Use of SET BELL to Play a Waveform (.WAV) File in FoxPro =

Article ID: 95317

Article Last Modified on 12/3/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft FoxPro 2.6 Standard Edition
 * Microsoft FoxPro 2.6a Standard Edition
 * Microsoft FoxPro 2.6a Professional Edition for Macintosh

-



This article was previously published under Q95317



SUMMARY
In Microsoft FoxPro for Windows and Macintosh, the SET BELL command can be used to assign a sound file in waveform (.WAV) format to be activated instead of the default bell.



Using the SET BELL Command in FoxPro for Windows
The following commands assign the waveform file CHIMES.WAV to the FoxPro bell and play that sound: SET BELL TO &quot;CHIMES.WAV&quot;, 1 ? CHR(7) NOTE: 1, the second parameter of the SET BELL command, has no effect when the bell is set to a waveform file; however, a numeric value must still be passed as the second parameter.

The above SET BELL command will cause a syntax error in Microsoft FoxPro version 2.5 for MS-DOS because this functionality is not currently available in the MS-DOS version of FoxPro.

To play a waveform file, an appropriate sound driver must be installed in the Windows Control Panel by using the Drivers icon. For more information on installing sound drivers, see the &quot;Microsoft Windows User's Guide.&quot;

NOTE: Setting the bell to a .WAV file on a machine without a sound driver does not give an error, but it will not work and the bell won't reset properly after issuing &quot;SET BELL TO, &quot; (without the quotation marks).

Using the SET BELL Command in FoxPro for Macintosh
The following commands assign the different waveform files to the FoxPro bell and play the sounds: SET BELL TO &quot;quack&quot;,0 ?? CHR(7)

SET BELL TO &quot;droplet&quot;,0 ?? CHR(7) Any sound whose name appears in the Sound Control Panel can be used as the FoxPro bell, including sounds that you record. Just use the name that appears for the sound in the Sound Control Panel in the SET BELL TO command.

Additional query words: kbsound VFoxWin FoxWin FoxMac 2.50 2.50a 2.50b 2.50c wave beep wavefile form recording

Keywords: KB95317

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.