This document discusses using checkboxes in Visual BASIC .NET 2012, including code snippets that demonstrate how to add items to a list box when a checkbox is checked or clicked, change the list box background color when a checkbox is unchecked, and clear the list box items when a checkbox is unchecked. The tutorial is intended for beginners without prior programming experience.
Convert to study guideBETA
Transform any presentation into a summarized study guide, highlighting the most important points and key insights.
1 of 5
Download to read offline
More Related Content
Part18 checkbox using vb.net
1. Visual BASIC .NET 2012
PART 18-Checkbox
Dr. GIRIJA NARASIMHAN 1
This slides are available http://slideshare.net /nbgirija
2. Dr. GIRIJA NARASIMHAN 2
This tutorial only for beginners , those
who don’t have any knowledge about
any programming language skill and
application design.
4. Dr.GIRIJA NARASIMHAN 4
Public Class Form4
Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles
CheckBox1.CheckedChanged
If CheckBox1.CheckState = CheckState.Checked Then
ListBox1.Items.Add(CheckBox1.Text)
ElseIf CheckBox1.CheckState = 0 Then
ListBox1.Enabled = False
End If
End Sub
Private Sub CheckBox2_mouseclick(sender As Object, e As EventArgs) Handles
CheckBox2.MouseClick
If CheckBox2.Checked = True Then
ListBox1.Items.Add(CheckBox2.Text)
ElseIf CheckBox2.Checked = False Then
ListBox1.BackColor = Color.Coral
End If
End Sub
5. Dr.GIRIJA NARASIMHAN 5
Private Sub CheckBox3_mouseclick(sender As Object, e As EventArgs) Handles
CheckBox3.MouseClick
If CheckBox3.Checked = True Then
ListBox1.Items.Add(CheckBox3.Text)
Else
ListBox1.Items.Clear()
End If
End Sub
End Class