Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Play sound
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00555354
Message ID:
00555482
Views:
15
>Hi
>
>Which is the fast method to play a sound within a form or procedure?
>
>TIA
PROCEDURE Playsound
PARAMETERS cWavFile

If IsNull(cWavFile)
Return .f.
EndIf

Declare Integer mciSendString IN WINMM String sendstr, Integer retstr, Integer szret, Integer callback

mciSendString("open " + FullPath(cWavfile) + " type waveaudio alias mmwav", 0, 0, 0)
mciSendString("play mmwav wait", 0, 0, 0)
mciSendString("close mmwav", 0, 0, 0)

Return .t.

ENDPROC
HTH

Alonso
Like Frank said: "I did it... MY WAY!"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform