

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
CheckBox code in visual studio very simple easy to understand No error fully executable
Typology: Study Guides, Projects, Research
1 / 2
This page cannot be seen from the preview
Don't miss anything!


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 WindowsFormsApplication { public partial class Form1 : Form { public Form1() { InitializeComponent(); }
private void button1_Click(object sender, EventArgs e) { if (checkBox1.Checked) { this.BackColor = Color.Red; checkBox1.Checked = false; } }
private void button2_Click(object sender, EventArgs e) { if (checkBox2.Checked) { this.BackColor = Color.Green; checkBox2.Checked = false; } }
private void button3_Click(object sender, EventArgs e) { if (checkBox3.Checked) { this.BackColor = Color.Blue; checkBox3.Checked = false; } }
private void button4_Click(object sender, EventArgs e) { if (checkBox4.Checked) { this.BackColor = Color.Yellow; checkBox4.Checked = false;
private void button5_Click(object sender, EventArgs e) { if (checkBox5.Checked) { this.BackColor = Color.Brown; checkBox5.Checked = false; } }
private void button6_Click(object sender, EventArgs e) { this.BackColor = Color.LightGray; }
private void button7_Click(object sender, EventArgs e) { this.Close(); } } }