Start event B after A is done
<p>I have quit button with really simple function <em>close();</em>.</p>

<p>How can i do that? After sound end (2-3sec) app close.</p>

<pre><code>private void button1_Click(object sender, EventArgs e)
{
// Play sound
this.playSound();

// WAIT FOR END OF SOUND

Close();
}

private void playSound()
{
            Random random = new Random();

            // Create list of quit music
            List&lt;System.IO.UnmanagedMemoryStream&gt; sound = new List&lt;System.IO.UnmanagedMemoryStream&gt;
            {
                global::Launcher.Properties.Resources.sound_quit_1,
                global::Launcher.Properties.Resources.sound_quit_2,
                global::Launcher.Properties.Resources.sound_quit_3,
                global::Launcher.Properties.Resources.sound_quit_4,
            };

            // Random, set and play sound
            (new SoundPlayer(sound[random.Next(sound.Count)])).Play();
}
</code></pre>
