Article ID: 102585
Article Last Modified on 11/17/2003
SET LIBRARY TO SYS(2004)+"FOXTOOLS.FLL"
MREGISTER=REGFN("SndPlaySound","CI","I","mmsystem")
MWAVE="Chimes.wav"
MFLAG=1
MCALL=CALLFN(MREGISTER,MWAVE,MFLAG)
The sndPlaySound() function plays a waveform sound specified by a
filename or by an entry in the [Sounds] section of the WIN.INI file.
If the sound can't be found, it plays the default sound specified by
the SystemDefault entry in the [Sounds] section of the WIN.INI file.
If there is a now SystemDefault entry or if the default sound can't be
found, the function makes no sound and returns FALSE.
0 - The sound is played synchronously and the function does not
return until the sound ends (all programs stop processing until
the sound is done playing).
1 - The sound is played asynchronously and the function returns
immediately after beginning the sound. To terminate an
asynchronously played sound, call the sndPlaySound() function
with MWAVE set to NULL. (The program will continue operation
with the sound playing at the same time.)
2 - If the sound can't be found, the function returns silently
without playing the default sound.
9 - The sound will continue to play repeatedly until sndPlaySound()
is called again with MWAVE set to NULL.
16 - If a sound is currently playing, the function will immediately
return FALSE without playing the requested sound.
NOTE: To use more than one option, add the numbers together. [For
example, use 11 to play the sound repeatedly; if the sound cannot
be found, sndPlaySound() will not play the default sound.]
Additional query words: kbsound VFoxWin FoxWin 2.50 wave form WAV wave
Keywords: kbmm kbcode KB102585