I’m trying to add a notification alarm when a user presses a button
private void button1_Click(object sender, EventArgs e)
{
SoundPlayer simpleSound = new SoundPlayer(@"C:\Users\.........\ambbrdg7.wav");
simpleSound.Play();
}
I want to add the ambbrdg7.wav to my exe file to make sure my program always has access to this file
Project + Properties, Resources tab, click on the arrow on the “Add Resource” button and select your .wav file. Then it is simply:
where “tada.wav” was the resource I added, change it to your resource name.