jbutler483
jbutler483

Reputation: 24539

How to play a Sound through External Speaker in vb.Net?

I have a button called 'btnLogin' on my form, and want to play a 'beep' sound when this button is pressed.

I have already attempted the 'Beep()' command, but this will only play through the motherboard, and not any external speakers.

How could i make this button command work?

Upvotes: 2

Views: 1473

Answers (1)

Jhuliano Moreno
Jhuliano Moreno

Reputation: 989

Always use MSDN as a reference when trying to code things in .NET framework, they have a pretty extensive documentation with example and usual stuff you would need.

My.Computer.Audio.Play("c:\Windows\Media\chimes.wav")

From: http://msdn.microsoft.com/en-us/library/4y171b18(v=vs.90).aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1

Upvotes: 1

Related Questions