Welcome to WindowsClient.net | My Blog | Sign in | Join

Windows Client Videos

Windows Forms Controls Lesson 1: How to Add Audio Part 1

This video shows how to use the SoundPlayer control to play wav audio files in your application.

By: MSDN

Comments

Mr_CS said:

Thanks for this pretty Video.

But for Sorrow I've a problem.

I tried to execute the code with V.S 2005

private System.Media.SoundPlayer sp = new System.Media.SoundPlayer();

       private void btn_play_Click(object sender, EventArgs e)

       {

           sp.Stream = Properties.Resources.Mama;

           sp.PlayLooping();

       }

I had this beautiful ERROR (:D)

- Cannot implicitly convert type 'byte[]' to 'System.IO.Stream'

I'm just a beginner and looking forward HELP

And thanks for every thing.

# January 1, 2009 7:41 PM