Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Playing WAV's from foxpro
Message
From
13/11/1996 10:41:14
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Playing WAV's from foxpro
Miscellaneous
Thread ID:
00012151
Message ID:
00012151
Views:
86
Hello all, I have just come back from my second trip to work today :0 Yesterday I told someone write me after 5 and well they did. I cant remember who right now but, They wanted to know how to play waves in Foxpro. I have brought the code in with me today.

Firstly there are 2 ways to do it. The first is very straight forward but limited to sounds only. The second will allow for wav, mid, and avi files. So its your choice.

*** Method 1:

****************************
*** This is a tiny function to
*** Play a wav file in foxpro
***
*** This code works in ALL versions
*** of foxpro for windows. 2.5+

FUNCTION PLAY
PARA TheWav

SET BELL TO TheWav,0
? CHR(7)
SET BELL TO
RETURN
***************

*** Method 2:
*** This is the API call that will allow multimedia
*** files to be played via foxpro.

DECLARE INTEGER MCIEXECUTE IN WIN32API STRING AS _MCI

_MCI("Play C:\WINDOWS\DING.WAV") && It has to say 'Play' & the file as one string.
~Joe Johnston USA

"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams

Next
Reply
Map
View

Click here to load this message in the networking platform