// Programmer: Janet Joy // Illustrate a few events for controls. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace eventtest { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { this.Text = "Events"; } private void button1_Click(object sender, EventArgs e) { } private void button1_Click_1(object sender, EventArgs e) { this.Text = "You clicked the button"; } private void checkBox1_CheckedChanged(object sender, EventArgs e) { this.Text = ""+checkBox1.Checked; } private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { this.Text = listBox1.Text; } private void label1_Click(object sender, EventArgs e) { label1.Text = "You clicked the label"; } } }