CheckBox Code in visual studio c++, Study Guides, Projects, Research of Computer Programming

CheckBox code in visual studio very simple easy to understand No error fully executable

Typology: Study Guides, Projects, Research

2017/2018

Uploaded on 01/21/2018

manazir-abbas
manazir-abbas 🇵🇰

1

(1)

5 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
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 WindowsFormsApplication2
{
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;
pf2

Partial preview of the text

Download CheckBox Code in visual studio c++ and more Study Guides, Projects, Research Computer Programming in PDF only on Docsity!

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(); } } }