How to make error sound using WinForms in C#

1 Answer

0 votes
namespace WinFormsApp1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            System.Media.SystemSounds.Exclamation.Play();
        }
    }
}




/*
run:
 

  
*/

 



answered Jan 22, 2024 by avibootz

Related questions

1 answer 191 views
1 answer 191 views
1 answer 136 views
2 answers 171 views
171 views asked Aug 28, 2023 by avibootz
1 answer 78 views
...