playing sound on events... 
Author Message
 playing sound on events...

Hi again...

I would like to know how to play some sound when clicking a button and so
on, the thing is that i dont feel like having media player or something
like that running each time i press a button... I mean, im looking for some
way to do something like "windows sounds", you know, hearing some sounds
when you minimize a window, or close another, etc...


Thanks in advance to anyone who can help me.

-Quercus-



Thu, 12 Apr 2001 02:00:00 GMT  
 playing sound on events...
I've got the same problem. I discovered PlaySound:

Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal
lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long

but I don't know how to use it. MSDN Online Library shows the usage, but I'm
a beginner, and don't understand yet.

If anyone can explain this puppy or give an example, I'd sure appreciate it!
It's the last thing before my first real program is finished.

John Cook

Quote:

>Hi again...

>I would like to know how to play some sound when clicking a button and so
>on, the thing is that i dont feel like having media player or something
>like that running each time i press a button... I mean, im looking for
some
>way to do something like "windows sounds", you know, hearing some sounds
>when you minimize a window, or close another, etc...


>Thanks in advance to anyone who can help me.

>-Quercus-



Fri, 20 Apr 2001 03:00:00 GMT  
 playing sound on events...
I think it needs to be 'sndPlaySound' in stead of
'PlaySound.' I feel like I read somewhere that
there was an error in Microsoft's documentation
and they printed it wrong. Try this instead:

Declare Function sndPlaySound Lib "winmm.dll"
Alias "sndPlaySoundA" ByVal lpszName As String,
ByVal hModule As Long, ByVal dwFlags As Long) As
Long

Hope this works!

tinrat

Quote:

> I've got the same problem. I discovered PlaySound:

> Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal
> lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long

> but I don't know how to use it. MSDN Online Library shows the usage, but I'm
> a beginner, and don't understand yet.

> If anyone can explain this puppy or give an example, I'd sure appreciate it!
> It's the last thing before my first real program is finished.

> John Cook


> >Hi again...

> >I would like to know how to play some sound when clicking a button and so
> >on, the thing is that i dont feel like having media player or something
> >like that running each time i press a button... I mean, im looking for
> some
> >way to do something like "windows sounds", you know, hearing some sounds
> >when you minimize a window, or close another, etc...


> >Thanks in advance to anyone who can help me.

> >-Quercus-



Sat, 21 Apr 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Playing Sounds from Events in Registry

2. Sounds - Playing System Event Sounds (asterisk, critical stop, question, etc)

3. Playing sounds even if other applications are playing sounds

4. Playing Sound file on event??!!

5. Play WAV sound on event??

6. Playing a WAV sound on a click event.

7. Play an application sound Event

8. play sound after sound.

9. Urgent, How to: Play sound using sound card?

10. Urgent, How to: Play sound using sound card?

11. Having the Sound Events sound file located in a DLL

12. Play sound from OLE field

 

 
Powered by phpBB® Forum Software