Click here to Skip to main content
16,019,740 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I want to add music in my program....
Posted
Comments
[no name] 17-Oct-12 22:28pm    
Okay good for you! Since you do not seem to have any sort of a question you must be seeking permission. You have my permission to add music to your program.
Sergey Alexandrovich Kryukov 17-Oct-12 23:43pm    
Right. Yet another non-question.
--SA

1 solution

Just Add COM component from add refference.
This is dll name WMPLib its also known as Window media Player

and the code is....


C#
using WMPLib;
using System.Media;


C#
WMPLib.WindowsMediaPlayer wplayer = new WMPLib.WindowsMediaPlayer();
                   wplayer.URL = "C:\\File Name\\Song.mp3";
                   wplayer.controls.play();




This will work sure........

Dharmendra Rai,
Ghaziabad,
India
 
Share this answer
 
v2
Comments
a1mimo 21-Oct-12 19:08pm    
My vote of 5 because actually I am sure this wasn't what he asked for but at least you tried to give him something for that non question question :-)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900