Play sound when the splash screen is displayed?

I want to play sound while my splash screen is receiving data from the server.

The sound file is not too large. I want something like when you start your computer you hear the MSWinXP welcome sound and when you create your account.

How can i do this?

Thnx

+1


source to share


1 answer


Use System.Media.SoundPlayer

. You may need to put this code in Form_Load.



    private void button1_Click(object sender, EventArgs e)
    {
        System.Media.SoundPlayer player = new System.Media.SoundPlayer();
        player.SoundLocation = @"C:\Windows\Media\chimes.wav";
        player.Play();
    }

      

+2


source







All Articles