FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour sound when click in button
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
sound when click in button
Posted: Tue Mar 31, 2009 07: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/
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: sound when click in button
Posted: Tue Mar 31, 2009 07: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 :-)
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.
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
Re: sound when click in button
Posted: Tue Mar 31, 2009 07:29 PM

Thank“s

:)

FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Re: sound when click in button
Posted: Wed Apr 01, 2009 07: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

Continue the discussion