General information
Category:
Coding, syntax & commands
>I wanted to play a "click" sound, or rather a click WAV file whenever the user clicks on a certain button. I know I've got to do it within the Click event but how do I play a WAV file?
>
>Ben
I spent an hour with Micosoft foxpro people and he faxed me the code necessary to play WAV files as follows:
SET LIBRARY TO SYS(2004)+"FOXTOOLS.FLL"
MREGISTER=REGFN("SndPlaySound","CI","I","mmsystem)
MWAVE="chimes.wav"
MFLAG=1
MCALL=CALL=CALLFN(MREGISTER,MWAVE,MFLAG)
The program will search the current directory, the Windows Program directory, then the Windows system directory looking for the WAV
file. MFLAG=1 plays the sound asynchronously with your program, and =0 stops the program until the sound is finished. There are other options if you are interested.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only