Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to play .wav files form VFP?
Message
From
11/11/1997 17:58:22
 
 
To
11/11/1997 03:58:51
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00059224
Message ID:
00059602
Views:
649
Kaumir,

here they are :
----
From: Arnon Gal-Oz
Subject: Re: play .wav sounds with vfp?
Date: Monday, November 03, 1997 4:48 AM

Hmmm , let see - what about
SET BELL to "c:\windows\msremind.wav",10
? chr(7)

Arnon
----
From: David Frankenbach
Subject: Re: play .wav sounds with vfp?
Date: Monday, November 03, 1997 8:11 AM

Rostand,

Here are the WinAPI calls to play sound:

declare integer sndPlaySound in winmm.dll string cSoundName,
integer uFlags
x="C:\WIN95\MEDIA\The Microsoft Sound.wav"
?sndPlaySound( x, 16 ) && delay VFP till finished
?sndPlaySound( x, 17 ) && asynchronous

Under WinNT and VFP3 I think you have to use sndPlaySoundW.

df - (MVP FoxPro) http://www.geocities.com/ResearchTriangle/9834/

Rostand Abear wrote in article
...
> mmm... wouldn't it be fun if vfp program plays
> .wav files if a user clicked a button and data
> entered is not valid?
> does anybody have an idea how? :)
----
From: jc
Subject: Re: play .wav sounds with vfp?
Date: Monday, November 03, 1997 6:49 PM

Rostand Abear wrote in article
...
> mmm... wouldn't it be fun if vfp program plays
> .wav files if a user clicked a button and data
@Try ActiveX: Microsoft MCI Control
thisform.Wavplayer.Enabled = .T.
* open wave
thisform.Wavplayer.Notify = .F.
thisform.Wavplayer.Wait = .T.
thisform.Wavplayer.Shareable = .F.
thisform.Wavplayer.DeviceType = "WaveAudio"
thisform.Wavplayer.FileName = "\others\ringin.wav"
thisform.Wavplayer.Command = "Open"
* play wave
thisform.Wavplayer.Notify = .F.
thisform.Wavplayer.Wait = .T.
thisform.Wavplayer.From = 1
thisform.Wavplayer.To = thisform.Wavplayer.Length
thisform.Wavplayer.Command = "Play"
* close wave
thisform.Wavplayer.Notify = .F.
thisform.Wavplayer.Wait = .T.
thisform.Wavplayer.Command = "Close"
rostand
"le rêve d'étoiles" - (Fr.) the dream of the stars Ü
Previous
Reply
Map
View

Click here to load this message in the networking platform