• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 656
  • Last Modified:

C#.NET app needs to trigger sound wave files

How do I trigger a sound wave file (.wav) from a C#.NET application using VS 2005?
0
alexmac05
Asked:
alexmac05
2 Solutions
 
udhayakumardCommented:
Try this:

System.Media.SoundPlayer myPlayer = new System.Media.SoundPlayer();
myPlayer.SoundLocation = @"c:\click.wav";
myPlayer.Play();
0
 
joesthebighmoeCommented:
.Net 2.0 has a new namespace called System.Media
So playing a sound is as easy as creating a Player object
System.Media.Player myPlayer = new System.Media.Player();
myPlayer.SoundLocation = [path to wav file]
myPlayer.Play();
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now