Page 1 of 1

sound when click in button

PostPosted: Tue Mar 31, 2009 7:12 pm
by goosfancito
HI.

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

thank´s

Re: sound when click in button

PostPosted: Tue Mar 31, 2009 7:26 pm
by ukoenig
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:

Re: sound when click in button

PostPosted: Tue Mar 31, 2009 7:29 pm
by goosfancito
:)

Thank´s

Re: sound when click in button

PostPosted: Wed Apr 01, 2009 7:23 am
by StefanHaupt
What about using TONE(<nFrequency>, <nDuration>) instead of SndPlaySound(). It´s really faster, because no soundfile has to be loaded.