playing a sound

  • Thread starter Thread starter Gregory Khrapunovich
  • Start date Start date
G

Gregory Khrapunovich

How can I play a sound from a .wav file? Is there a way to incorporate .wav
file in the application so I won't have to redistribute it with the
executable?
Thank you.
Gregory Khrapunovich
 
Gregory Khrapunovich said:
How can I play a sound from a .wav file? Is there a way to incorporate
.wav
file in the application so I won't have to redistribute it with the
executable?

If you are using .NET 2.0, you may want to use
'System.Windows.Forms.SoundPlayer'. For older versions of the .NET
Framework you can add the wave file as embedded resource and use the code
shown on the page below for playback:

<URL:http://dotnet.mvps.org/dotnet/code/misc/#PlaySound>
 
Back
Top