sound when click in button

sound when click in button

Postby goosfancito » Tue Mar 31, 2009 7:12 pm

HI.

I need insert one sound when user has clicked in button. like i do it?

thank´s
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm

Re: sound when click in button

Postby ukoenig » Tue Mar 31, 2009 7:26 pm

Hello,

Include SndPlaySound in Your Button-Action.

@ 4, 2 BUTTON "Date-Test" size 50, 25 OF oDlg ;
ACTION ( SndPlaySound( "chord.wav", 0 ), ;
more actions ... )

But I noticed, even on a fast computer it takes some times, the wave-sound is played.
The sound is not played the same time with button-click. There is also a speaker-sound but I didn't test it.

Regards
Uwe :lol:
Last edited by ukoenig on Tue Mar 31, 2009 7:32 pm, edited 1 time in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: sound when click in button

Postby goosfancito » Tue Mar 31, 2009 7:29 pm

:)

Thank´s
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm

Re: sound when click in button

Postby StefanHaupt » Wed Apr 01, 2009 7:23 am

What about using TONE(<nFrequency>, <nDuration>) instead of SndPlaySound(). It´s really faster, because no soundfile has to be loaded.
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 69 guests