How to displays a message window using MessageBox with WinForms in C#

2 Answers

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

        private void button1_Click(object sender, EventArgs e)
        {
            MessageBox.Show("button1_Click");
        }
    }
}




/*
run:
 

  
*/

 



answered Jan 4, 2024 by avibootz
0 votes
namespace WinFormsApp1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            MessageBox.Show("button1_Click", "caption");
        }
    }
}




/*
run:
 

  
*/

 



answered Jan 4, 2024 by avibootz
...