Making sound  
Author Message
Cemil





PostPosted: Mon Jan 12 05:39:58 CST 2004 Top

Winforms >> Making sound Hi,

How do I make the bell sound, heard when some message
boxes are displayed?

Thanks

DotNet185  
 
 
Ken





PostPosted: Mon Jan 12 05:39:58 CST 2004 Top

Winforms >> Making sound Hi,

You have to use the API to do it.

Declares
Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _

(ByVal lpszSoundName As String, ByVal uFlags As Integer) As Integer

Const SND_ASYNC = &H1 ' play asynchronously



To use

sndPlaySound("C:\windows\media\notify.wav", SND_ASYNC)



Ken

--------------------------

"joe" <EMail@HideDomain.com> wrote in message
news:027f01c3d8c0$ca08a330$EMail@HideDomain.com...
> Hi,
>
> How do I make the bell sound, heard when some message
> boxes are displayed?
>
> Thanks


 
 
hirf-spam-me-here





PostPosted: Mon Jan 12 06:24:08 CST 2004 Top

Winforms >> Making sound * "joe" <EMail@HideDomain.com> scripsit:
> How do I make the bell sound, heard when some message
> boxes are displayed?

P/invoke on 'MessageBeep':

<http://groups.google.com/groups?selm=um%23NZB70DHA.832%40TK2MSFTNGP09.phx.gbl>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
 
 
a





PostPosted: Mon Jan 12 16:47:51 CST 2004 Top

Winforms >> Making sound Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

Beep()

End Sub

Kevin



"joe" <EMail@HideDomain.com> wrote in message
news:027f01c3d8c0$ca08a330$EMail@HideDomain.com...
> Hi,
>
> How do I make the bell sound, heard when some message
> boxes are displayed?
>
> Thanks