How to play music in window form application by clicking button C#
<p>I want to create a button, when the user click the button, the application can play music (played in embedded way or external way are both ok) I am just a rookie on c# and only know how to     create a button Anyone know how to code it?</p>

<p>I found a way to run wav file</p>

<pre><code>My.Computer.Audio.Play("wave.wav", AudioPlayMode.WaitToComplete)
</code></pre>

<p>However, I have added Microsoft.VisualBasic.dll" and 
"Microsoft.DirectX.AudioVideoPlayback.dll into reference, the MY is still undefined.</p>

<p>Here is my button function</p>

<pre><code>private void musicbutton_Click(object sender, EventArgs e)
{

    {
        SoundPlayer snd = null;



            Stream str = Properties.Resources.mysong;
            snd = new SoundPlayer(str);
            snd.Play();

    }
</code></pre>
