<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net%2FGUI%2FCheckBoxList</id>
		<title>VB.Net/GUI/CheckBoxList - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net%2FGUI%2FCheckBoxList"/>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net/GUI/CheckBoxList&amp;action=history"/>
		<updated>2026-04-05T05:58:38Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net/GUI/CheckBoxList&amp;diff=482&amp;oldid=prev</id>
		<title> в 16:40, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net/GUI/CheckBoxList&amp;diff=482&amp;oldid=prev"/>
				<updated>2010-05-26T16:40:06Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 16:40, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net/GUI/CheckBoxList&amp;diff=483&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net/GUI/CheckBoxList&amp;diff=483&amp;oldid=prev"/>
				<updated>2010-05-26T12:43:17Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Add Object to CheckedListBox: use ToString Method==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;&lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
&lt;br /&gt;
Public Class MainClass&lt;br /&gt;
    &lt;br /&gt;
    Shared Sub Main()&lt;br /&gt;
        Dim form1 As Form = New Form1&lt;br /&gt;
        Application.Run(form1)&lt;br /&gt;
&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
#Region &amp;quot; Windows Form Designer generated code &amp;quot;&lt;br /&gt;
    Public Sub New()&lt;br /&gt;
        MyBase.New()&lt;br /&gt;
        &amp;quot;This call is required by the Windows Form Designer.&lt;br /&gt;
        InitializeComponent()&lt;br /&gt;
        &amp;quot;Add any initialization after the InitializeComponent() call&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Form overrides dispose to clean up the component list.&lt;br /&gt;
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;
        If disposing Then&lt;br /&gt;
            If Not (components Is Nothing) Then&lt;br /&gt;
                components.Dispose()&lt;br /&gt;
            End If&lt;br /&gt;
        End If&lt;br /&gt;
        MyBase.Dispose(disposing)&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Required by the Windows Form Designer&lt;br /&gt;
    Private components As System.ruponentModel.IContainer&lt;br /&gt;
    &amp;quot;NOTE: The following procedure is required by the Windows Form Designer&lt;br /&gt;
    &amp;quot;It can be modified using the Windows Form Designer.  &lt;br /&gt;
    &amp;quot;Do not modify it using the code editor.&lt;br /&gt;
    Friend WithEvents lstEmployees As System.Windows.Forms.CheckedListBox&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; Private Sub InitializeComponent()&lt;br /&gt;
        Me.lstEmployees = New System.Windows.Forms.CheckedListBox()&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;lstEmployees&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.lstEmployees.Location = New System.Drawing.Point(8, 12)&lt;br /&gt;
        Me.lstEmployees.Name = &amp;quot;lstEmployees&amp;quot;&lt;br /&gt;
        Me.lstEmployees.Size = New System.Drawing.Size(264, 196)&lt;br /&gt;
        Me.lstEmployees.TabIndex = 1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Form1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 14)&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(280, 218)&lt;br /&gt;
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.lstEmployees})&lt;br /&gt;
        Me.Font = New System.Drawing.Font(&amp;quot;Tahoma&amp;quot;, 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;List Control Example&amp;quot;&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
    End Sub&lt;br /&gt;
#End Region&lt;br /&gt;
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;
        lstEmployees.Items.Add(New Employee(&amp;quot;A&amp;quot;, &amp;quot;B&amp;quot;, DateTime.Now))&lt;br /&gt;
        lstEmployees.Items.Add(New Employee(&amp;quot;C&amp;quot;, &amp;quot;D&amp;quot;, DateTime.Now))&lt;br /&gt;
        lstEmployees.Items.Add(New Employee(&amp;quot;E&amp;quot;, &amp;quot;F&amp;quot;, DateTime.Now))&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
Public Class Employee&lt;br /&gt;
    Public FirstName As String&lt;br /&gt;
    Public LastName As String&lt;br /&gt;
    Public BirthDate As Date&lt;br /&gt;
    Public Sub New()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Public Sub New(ByVal firstName, ByVal lastName, ByVal birthDate)&lt;br /&gt;
        Me.FirstName = firstName&lt;br /&gt;
        Me.LastName = lastName&lt;br /&gt;
        Me.BirthDate = birthDate&lt;br /&gt;
    End Sub&lt;br /&gt;
    Public Overrides Function ToString() As String&lt;br /&gt;
        Return FirstName &amp;amp; &amp;quot; &amp;quot; &amp;amp; LastName&lt;br /&gt;
    End Function&lt;br /&gt;
End Class&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CheckBox List: add Object==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;&lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Data&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Public Class MainClass&lt;br /&gt;
    &lt;br /&gt;
    Shared Sub Main()&lt;br /&gt;
        Dim form1 As Form = New Form1&lt;br /&gt;
        Application.Run(form1)&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
&lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Private Sub Form1_Load(ByVal sender As System.Object, _&lt;br /&gt;
     ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;
        clbStudents.Items.Add(New Student(&amp;quot;A&amp;quot;, &amp;quot;A&amp;quot;), True)&lt;br /&gt;
        clbStudents.Items.Add(New Student(&amp;quot;B&amp;quot;, &amp;quot;B&amp;quot;), False)&lt;br /&gt;
        clbStudents.Items.Add(New Student(&amp;quot;C&amp;quot;, &amp;quot;C&amp;quot;), _&lt;br /&gt;
            CheckState.Indeterminate)&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
Public Class Student&lt;br /&gt;
    Public FirstName As String&lt;br /&gt;
    Public LastName As String&lt;br /&gt;
    Public Sub New(ByVal first_name As String, ByVal last_name As String)&lt;br /&gt;
        FirstName = first_name&lt;br /&gt;
        LastName = last_name&lt;br /&gt;
    End Sub&lt;br /&gt;
    Public Overrides Function ToString() As String&lt;br /&gt;
        Return FirstName &amp;amp; &amp;quot; &amp;quot; &amp;amp; LastName&lt;br /&gt;
    End Function&lt;br /&gt;
End Class&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Global.Microsoft.VisualBasic.rupilerServices.DesignerGenerated()&amp;gt; _&lt;br /&gt;
Partial Public Class Form1&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
    &amp;quot;Form overrides dispose to clean up the component list.&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerNonUserCode()&amp;gt; _&lt;br /&gt;
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;
        If disposing AndAlso components IsNot Nothing Then&lt;br /&gt;
            components.Dispose()&lt;br /&gt;
        End If&lt;br /&gt;
        MyBase.Dispose(disposing)&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Required by the Windows Form Designer&lt;br /&gt;
    Private components As System.ruponentModel.IContainer&lt;br /&gt;
    &amp;quot;NOTE: The following procedure is required by the Windows Form Designer&lt;br /&gt;
    &amp;quot;It can be modified using the Windows Form Designer.  &lt;br /&gt;
    &amp;quot;Do not modify it using the code editor.&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; _&lt;br /&gt;
    Private Sub InitializeComponent()&lt;br /&gt;
        Me.clbStudents = New System.Windows.Forms.CheckedListBox&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;clbStudents&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.clbStudents.FormattingEnabled = True&lt;br /&gt;
        Me.clbStudents.Location = New System.Drawing.Point(8, 8)&lt;br /&gt;
        Me.clbStudents.Name = &amp;quot;clbStudents&amp;quot;&lt;br /&gt;
        Me.clbStudents.Size = New System.Drawing.Size(160, 123)&lt;br /&gt;
        Me.clbStudents.TabIndex = 0&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Form1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)&lt;br /&gt;
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(180, 187)&lt;br /&gt;
        Me.Controls.Add(Me.clbStudents)&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;UseCheckedListBox&amp;quot;&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Friend WithEvents clbStudents As System.Windows.Forms.CheckedListBox&lt;br /&gt;
End Class&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Check Box List: Get selected Items==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
&lt;br /&gt;
Module Module1&lt;br /&gt;
    Sub Main()&lt;br /&gt;
        Application.Run(New Form1)&lt;br /&gt;
    End Sub&lt;br /&gt;
End Module&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
#Region &amp;quot; Windows Form Designer generated code &amp;quot;&lt;br /&gt;
    Public Sub New()&lt;br /&gt;
        MyBase.New()&lt;br /&gt;
        &amp;quot;This call is required by the Windows Form Designer.&lt;br /&gt;
        InitializeComponent()&lt;br /&gt;
        &amp;quot;Add any initialization after the InitializeComponent() call&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Form overrides dispose to clean up the component list.&lt;br /&gt;
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;
        If disposing Then&lt;br /&gt;
            If Not (components Is Nothing) Then&lt;br /&gt;
                components.Dispose()&lt;br /&gt;
            End If&lt;br /&gt;
        End If&lt;br /&gt;
        MyBase.Dispose(disposing)&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Required by the Windows Form Designer&lt;br /&gt;
    Private components As System.ruponentModel.IContainer&lt;br /&gt;
    &amp;quot;NOTE: The following procedure is required by the Windows Form Designer&lt;br /&gt;
    &amp;quot;It can be modified using the Windows Form Designer.  &lt;br /&gt;
    &amp;quot;Do not modify it using the code editor.&lt;br /&gt;
    Friend WithEvents CheckedListBox1 As System.Windows.Forms.CheckedListBox&lt;br /&gt;
    Friend WithEvents Button1 As System.Windows.Forms.Button&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; Private Sub InitializeComponent()&lt;br /&gt;
        Me.CheckedListBox1 = New System.Windows.Forms.CheckedListBox()&lt;br /&gt;
        Me.Button1 = New System.Windows.Forms.Button()&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;CheckedListBox1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.CheckedListBox1.Location = New System.Drawing.Point(24, 32)&lt;br /&gt;
        Me.CheckedListBox1.Name = &amp;quot;CheckedListBox1&amp;quot;&lt;br /&gt;
        Me.CheckedListBox1.Size = New System.Drawing.Size(360, 64)&lt;br /&gt;
        Me.CheckedListBox1.TabIndex = 0&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Button1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Button1.Location = New System.Drawing.Point(152, 120)&lt;br /&gt;
        Me.Button1.Name = &amp;quot;Button1&amp;quot;&lt;br /&gt;
        Me.Button1.Size = New System.Drawing.Size(96, 23)&lt;br /&gt;
        Me.Button1.TabIndex = 1&lt;br /&gt;
        Me.Button1.Text = &amp;quot;Show Choice&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Form1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(416, 165)&lt;br /&gt;
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button1, Me.CheckedListBox1})&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;CheckListBoxDemo&amp;quot;&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
    End Sub&lt;br /&gt;
#End Region&lt;br /&gt;
    Public List() As String = {&amp;quot;A&amp;quot;,&amp;quot;B&amp;quot;,&amp;quot;C&amp;quot;,&amp;quot;D&amp;quot;}&lt;br /&gt;
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;
        CheckedListBox1.BeginUpdate()&lt;br /&gt;
        CheckedListBox1.DataSource = List&lt;br /&gt;
        CheckedListBox1.EndUpdate()&lt;br /&gt;
    End Sub&lt;br /&gt;
&lt;br /&gt;
    Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click&lt;br /&gt;
        If (CheckedListBox1.SelectedItem &amp;lt;&amp;gt; &amp;quot;&amp;quot;) Then&lt;br /&gt;
            Dim Entry As Object&lt;br /&gt;
            For Each Entry In CheckedListBox1.CheckedItems&lt;br /&gt;
                MessageBox.Show(Entry.ToString())&lt;br /&gt;
            Next&lt;br /&gt;
        Else&lt;br /&gt;
            MessageBox.Show(&amp;quot;You must select an item&amp;quot;)&lt;br /&gt;
        End If&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Checked list boxes==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;&lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Public Class MainClass&lt;br /&gt;
   Shared Sub Main()&lt;br /&gt;
        Dim myform As Form = New FrmCheckedListBox()&lt;br /&gt;
        Application.Run(myform)&lt;br /&gt;
   End Sub &amp;quot; Main&lt;br /&gt;
End Class&lt;br /&gt;
Public Class FrmCheckedListBox&lt;br /&gt;
   Inherits Form&lt;br /&gt;
#Region &amp;quot; Windows Form Designer generated code &amp;quot;&lt;br /&gt;
   Public Sub New()&lt;br /&gt;
      MyBase.New()&lt;br /&gt;
      &amp;quot;This call is required by the Windows Form Designer.&lt;br /&gt;
      InitializeComponent()&lt;br /&gt;
      &amp;quot;Add any initialization after the InitializeComponent() call&lt;br /&gt;
   End Sub&lt;br /&gt;
   &amp;quot;Form overrides dispose to clean up the component list.&lt;br /&gt;
   Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;
      If disposing Then&lt;br /&gt;
         If Not (components Is Nothing) Then&lt;br /&gt;
            components.Dispose()&lt;br /&gt;
         End If&lt;br /&gt;
      End If&lt;br /&gt;
      MyBase.Dispose(disposing)&lt;br /&gt;
   End Sub&lt;br /&gt;
   &amp;quot; list of available book titles&lt;br /&gt;
   Friend WithEvents chklstInput As CheckedListBox&lt;br /&gt;
   &amp;quot; user selection list&lt;br /&gt;
   Friend WithEvents lstDisplay As ListBox&lt;br /&gt;
   &amp;quot;Required by the Windows Form Designer&lt;br /&gt;
   Private components As System.ruponentModel.Container&lt;br /&gt;
   &amp;quot;NOTE: The following procedure is required by the Windows Form Designer&lt;br /&gt;
   &amp;quot;It can be modified using the Windows Form Designer.  &lt;br /&gt;
   &amp;quot;Do not modify it using the code editor.&lt;br /&gt;
   &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; Private Sub InitializeComponent()&lt;br /&gt;
      Me.chklstInput = New System.Windows.Forms.CheckedListBox()&lt;br /&gt;
      Me.lstDisplay = New System.Windows.Forms.ListBox()&lt;br /&gt;
      Me.SuspendLayout()&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      &amp;quot;chklstInput&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      Me.chklstInput.HorizontalScrollbar = True&lt;br /&gt;
      Me.chklstInput.Items.AddRange(New Object() {&amp;quot;C++&amp;quot;, &amp;quot;Java&amp;quot;, &amp;quot;VB&amp;quot;, &amp;quot;C#&amp;quot;, &amp;quot;Perl&amp;quot;, &amp;quot;Python HTP&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;SQL&amp;quot;})&lt;br /&gt;
      Me.chklstInput.Location = New System.Drawing.Point(16, 16)&lt;br /&gt;
      Me.chklstInput.Name = &amp;quot;chklstInput&amp;quot;&lt;br /&gt;
      Me.chklstInput.Size = New System.Drawing.Size(152, 124)&lt;br /&gt;
      Me.chklstInput.TabIndex = 1&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      &amp;quot;lstDisplay&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      Me.lstDisplay.Anchor = (System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right)&lt;br /&gt;
      Me.lstDisplay.HorizontalScrollbar = True&lt;br /&gt;
      Me.lstDisplay.Location = New System.Drawing.Point(184, 16)&lt;br /&gt;
      Me.lstDisplay.Name = &amp;quot;lstDisplay&amp;quot;&lt;br /&gt;
      Me.lstDisplay.Size = New System.Drawing.Size(128, 121)&lt;br /&gt;
      Me.lstDisplay.TabIndex = 2&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      &amp;quot;FrmCheckedListBox&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)&lt;br /&gt;
      Me.ClientSize = New System.Drawing.Size(328, 157)&lt;br /&gt;
      Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.lstDisplay, Me.chklstInput})&lt;br /&gt;
      Me.Name = &amp;quot;FrmCheckedListBox&amp;quot;&lt;br /&gt;
      Me.Text = &amp;quot;Checked List Box Test&amp;quot;&lt;br /&gt;
      Me.ResumeLayout(False)&lt;br /&gt;
   End Sub&lt;br /&gt;
#End Region&lt;br /&gt;
   Private Sub chklstInput_ItemCheck _&lt;br /&gt;
      (ByVal sender As System.Object, _&lt;br /&gt;
      ByVal e As System.Windows.Forms.ItemCheckEventArgs) _&lt;br /&gt;
      Handles chklstInput.ItemCheck&lt;br /&gt;
      Dim item As String = chklstInput.SelectedItem&lt;br /&gt;
      If e.NewValue = CheckState.Checked Then&lt;br /&gt;
         lstDisplay.Items.Add(item)&lt;br /&gt;
      Else&lt;br /&gt;
         lstDisplay.Items.Remove(item)&lt;br /&gt;
      End If&lt;br /&gt;
   End Sub&lt;br /&gt;
End Class&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Get selected item in a CheckBox List==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;&lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Data&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Public Class MainClass&lt;br /&gt;
    &lt;br /&gt;
    Shared Sub Main()&lt;br /&gt;
        Dim form1 As Form = New Form1&lt;br /&gt;
        Application.Run(form1)&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
&lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Private Sub Form1_Load(ByVal sender As System.Object, _&lt;br /&gt;
     ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;
        clbStudents.Items.Add(New Student(&amp;quot;A&amp;quot;, &amp;quot;A&amp;quot;), True)&lt;br /&gt;
        clbStudents.Items.Add(New Student(&amp;quot;B&amp;quot;, &amp;quot;B&amp;quot;), False)&lt;br /&gt;
        clbStudents.Items.Add(New Student(&amp;quot;C&amp;quot;, &amp;quot;C&amp;quot;), _&lt;br /&gt;
            CheckState.Indeterminate)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub btnListSelections_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnListSelections.Click&lt;br /&gt;
        Dim checked_items As CheckedListBox.CheckedItemCollection = clbStudents.CheckedItems&lt;br /&gt;
        Dim txt As String = &amp;quot;     Selected Students:&amp;quot; &amp;amp; vbCrLf&lt;br /&gt;
        For Each item As Object In checked_items&lt;br /&gt;
            txt &amp;amp;= item.ToString &amp;amp; vbCrLf&lt;br /&gt;
        Next item&lt;br /&gt;
        MessageBox.Show(txt)&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
Public Class Student&lt;br /&gt;
    Public FirstName As String&lt;br /&gt;
    Public LastName As String&lt;br /&gt;
    Public Sub New(ByVal first_name As String, ByVal last_name As String)&lt;br /&gt;
        FirstName = first_name&lt;br /&gt;
        LastName = last_name&lt;br /&gt;
    End Sub&lt;br /&gt;
    Public Overrides Function ToString() As String&lt;br /&gt;
        Return FirstName &amp;amp; &amp;quot; &amp;quot; &amp;amp; LastName&lt;br /&gt;
    End Function&lt;br /&gt;
End Class&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Global.Microsoft.VisualBasic.rupilerServices.DesignerGenerated()&amp;gt; _&lt;br /&gt;
Partial Public Class Form1&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
    &amp;quot;Form overrides dispose to clean up the component list.&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerNonUserCode()&amp;gt; _&lt;br /&gt;
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;
        If disposing AndAlso components IsNot Nothing Then&lt;br /&gt;
            components.Dispose()&lt;br /&gt;
        End If&lt;br /&gt;
        MyBase.Dispose(disposing)&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Required by the Windows Form Designer&lt;br /&gt;
    Private components As System.ruponentModel.IContainer&lt;br /&gt;
    &amp;quot;NOTE: The following procedure is required by the Windows Form Designer&lt;br /&gt;
    &amp;quot;It can be modified using the Windows Form Designer.  &lt;br /&gt;
    &amp;quot;Do not modify it using the code editor.&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; _&lt;br /&gt;
    Private Sub InitializeComponent()&lt;br /&gt;
        Me.clbStudents = New System.Windows.Forms.CheckedListBox&lt;br /&gt;
        Me.btnListSelections = New System.Windows.Forms.Button&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;clbStudents&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.clbStudents.FormattingEnabled = True&lt;br /&gt;
        Me.clbStudents.Location = New System.Drawing.Point(8, 8)&lt;br /&gt;
        Me.clbStudents.Name = &amp;quot;clbStudents&amp;quot;&lt;br /&gt;
        Me.clbStudents.Size = New System.Drawing.Size(160, 123)&lt;br /&gt;
        Me.clbStudents.TabIndex = 0&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;btnListSelections&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.btnListSelections.Location = New System.Drawing.Point(8, 152)&lt;br /&gt;
        Me.btnListSelections.Name = &amp;quot;btnListSelections&amp;quot;&lt;br /&gt;
        Me.btnListSelections.Size = New System.Drawing.Size(160, 23)&lt;br /&gt;
        Me.btnListSelections.TabIndex = 1&lt;br /&gt;
        Me.btnListSelections.Text = &amp;quot;List Selections&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Form1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)&lt;br /&gt;
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(180, 187)&lt;br /&gt;
        Me.Controls.Add(Me.btnListSelections)&lt;br /&gt;
        Me.Controls.Add(Me.clbStudents)&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;UseCheckedListBox&amp;quot;&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Friend WithEvents clbStudents As System.Windows.Forms.CheckedListBox&lt;br /&gt;
    Friend WithEvents btnListSelections As System.Windows.Forms.Button&lt;br /&gt;
End Class&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>