ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
Visual BASIC .NET 2012
PART 18-Checkbox
Dr. GIRIJA NARASIMHAN 1
This slides are available http://slideshare.net /nbgirija
Dr. GIRIJA NARASIMHAN 2
This tutorial only for beginners , those
who don’t have any knowledge about
any programming language skill and
application design.
Dr.GIRIJA NARASIMHAN 3
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
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

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