I have a MP3 file in my Resources of Visual C#. I'm trying to find out if there is a way I can play this MP3 in a Windows Media Player control or with MCI, I'm not particular. I'm fairly new to C#. Thanks!
Asked
Active
Viewed 6,176 times
2 Answers
2
This page shows you how in just a few lines of code:
http://www.crowsprogramming.com/archives/58
Hope this helps.
Edit: Be sure to copy the .mp3 to your bin before you run it.
And here is the source code. Be sure to add a reference to wmp.dll in your project.
WMPLib.WindowsMediaPlayer wmp = new WMPLib.WindowsMediaPlayer();
wmp.URL = "test.mp3";
wmp.controls.play();

Gary the Llama
- 321
- 1
- 4
- 15
0
this is a component for playing MP3 with C# on Windows Forms (it includes a demo app).
http://www.codeplex.com/keniamm/
hope this helps

Horacio N. Hdez.
- 651
- 5
- 4