---
title: "How should use CheckBox Control in VB.Net"  
description: "A Checkbox control is used to display a check_box. Where the Checkbox control gives us an option to select, say, yes/no or true/false. A checkbox i"  
author: "Pushpendra Singh"  
published: 2010-12-12  
updated: 2020-03-04  
canonical: https://www.mindstick.com/articles/291/how-should-use-checkbox-control-in-vb-dot-net  
category: "vb.net"  
tags: ["vb.net"]  
reading_time: 3 minutes  

---

# How should use CheckBox Control in VB.Net

A [Checkbox control](https://www.mindstick.com/articles/392/checkbox-control-in-c-sharp-dot-net) is used to display a check_box.

Where the Checkbox control gives us an option to select, say, yes/no or true/false.

A checkbox is clicked to select and clicked again to deselect some options.

If a checkbox is selected, a check (a tick mark) appears indicating a selection.

## How to use the CheckBox Control

[Drag and drop](https://www.mindstick.com/forum/454/how-to-drag-and-drop-multiple-image-from-one-canvas-to-onther-canvas-in-html5) three checkboxes and a Button from the toolbox on [window form](https://www.mindstick.com/forum/527/how-to-pass-datagridview-s-cells-value-to-another-window-form).

![CheckBox Control in VB.Net](https://www.mindstick.com/mindstickarticle/40535089-6b6f-4657-84b8-b884708b454d/images/cf271a74-beb3-4dfb-83c6-1772ec08b031.png)

Drag and drop two more CheckBox.

![CheckBox Control in VB.Net](https://www.mindstick.com/mindstickarticle/40535089-6b6f-4657-84b8-b884708b454d/images/adbb11c9-88a1-4e71-9b81-eef61f4330f2.png)

## Code:

```
Public Class Form4   Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e  As System.EventArgs) Handles CheckBox1.CheckedChanged         'display checkbox value when checkbox1 is checked         Label3.Text = "Selected Language is   " + CheckBox1.Text     End Sub    Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e  As System.EventArgs) Handles CheckBox2.CheckedChanged         'display checkbox value when checkbox2 is checked         Label3.Text = "Selected Language is   " + CheckBox2.Text     End Sub    Private Sub CheckBox3_CheckedChanged(ByVal sender As System.Object, ByVal e  As System.EventArgs) Handles CheckBox3.CheckedChanged         'display checkbox value when checkbox3 is checked        Label3.Text = "Selected Language is   " + CheckBox3.Text     End SubEnd Class
```

**Run the [project](https://yourviews.mindstick.com/story/1788/things-to-ensure-your-construction-project-is-successful)**

![CheckBox Control in VB.Net](https://www.mindstick.com/mindstickarticle/40535089-6b6f-4657-84b8-b884708b454d/images/e8ad4323-4141-432b-93bb-bb6276e428b2.png)

When you select any [language](https://yourviews.mindstick.com/view/81607/hindi-language-in-pakistan-is-getting-killed) then the CheckedChanged event of CheckBox will fire and the selected language will show in Label.

![CheckBox Control in VB.Net](https://www.mindstick.com/mindstickarticle/40535089-6b6f-4657-84b8-b884708b454d/images/9cec99ae-30d8-4198-bc77-7996e97621da.png)

**CheckBox Control [Properties](https://yourviews.mindstick.com/view/81845/now-it-s-possible-to-predict-properties-of-any-molecule)**

**CheckState:** The default value is Unchecked. Set it to True if you want a check to appear when form executed.

## For Example:

```
Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load         'check will appear at run time         CheckBox1.CheckState = CheckState.Checked     End Sub
```

**Output:**

![CheckBox Control in VB.Net](https://www.mindstick.com/mindstickarticle/40535089-6b6f-4657-84b8-b884708b454d/images/9cec99ae-30d8-4198-bc77-7996e97621da.png)

**Appearance:** [Default value](https://www.mindstick.com/forum/23023/default-value-when-using-singleordefault) is Normal. Set the value to Button if you want the CheckBox to be displayed as a Button.

## For Example:

```
'set checkbox appearance as button  Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)  Handles MyBase.Load         CheckBox1.Appearance = Appearance.Button         CheckBox2.Appearance = Appearance.Button         CheckBox3.Appearance = Appearance.Button End Sub
```

**Output:**

![CheckBox Control in VB.Net](https://www.mindstick.com/mindstickarticle/40535089-6b6f-4657-84b8-b884708b454d/images/4b8116fc-870c-4053-90fa-097999292213.png)

Now checkbox will show a button. But checkbox Behaviour will not change.

## BackColor:

You can change the BackColor of CheckBox for example

```
Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load         ' change the backcolor of checkbox         CheckBox1.BackColor = Color.BurlyWood         CheckBox2.BackColor = Color.BurlyWood         CheckBox3.BackColor = Color.BurlyWood    End Sub
```

At the run, time checkbox back_color will be changed.

**Output:**

![CheckBox Control in VB.Net](https://www.mindstick.com/mindstickarticle/40535089-6b6f-4657-84b8-b884708b454d/images/de136cbc-b858-4fb3-88ca-7d493c4170f6.png)

You should also read this [Article](https://yourviews.mindstick.com/view/81489/kashmir-now-after-an-year-of-abrogation-of-article-370) **- [Using ReportViewer in WinForms C#](https://www.mindstick.com/articles/1118/using-reportviewer-in-winforms-c-sharp)**

---

Original Source: https://www.mindstick.com/articles/291/how-should-use-checkbox-control-in-vb-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
