Skip to content

3. Button

sandeulsandeul edited this page May 11, 2020 · 1 revision

`

namespace WindowsFormsApp2 { public partial class Form1 : Form {

    public Form1()
    {
        InitializeComponent();
    }

    private void button1_Click(object sender, EventArgs e)
    {
        MessageBox.Show("Button1 is Clicked");
        button1.BackColor = Color.Cyan;
        button1.ForeColor = Color.Blue;
    }

    private void button2_Click(object sender, EventArgs e)
    {
        MessageBox.Show("Button2 is Clicked");
    }

    private void button3_Click(object sender, EventArgs e)
    {
        MessageBox.Show("Button3 is Clicked");
    }
}

}

`

Clone this wiki locally