0% found this document useful (0 votes)
427 views41 pages

Using CheckedListBox in VB.NET

The document provides code examples for using list boxes and check boxes in a Windows Form application. It demonstrates how to add list boxes and check boxes, populate them with items, handle selection change events, copy and move items between list boxes, and retrieve selected items. Errors that can occur with empty selections are also discussed. String builder is used to concatenate multiple selected items into a single string for display.

Uploaded by

Mohamad Saad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
427 views41 pages

Using CheckedListBox in VB.NET

The document provides code examples for using list boxes and check boxes in a Windows Form application. It demonstrates how to add list boxes and check boxes, populate them with items, handle selection change events, copy and move items between list boxes, and retrieve selected items. Errors that can occur with empty selections are also discussed. String builder is used to concatenate multiple selected items into a single string for display.

Uploaded by

Mohamad Saad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd

Electro-Team

Interesting Education

electroteam__@[Link]

ListBox & CheckedListBox

DialogBox

Display Toolbox

Add 2 Buttons & 1 ListBox

Display Properties Window

Select item property of ListBox

Add items of ListBox

Press ok to precede

Rename Form1 by changing Text property

Change Font property for all controls

Event
Button_Click

Changing [Link]

Double click Button1

Event
ListBox1_SelectedIndexChanged

Changing [Link]

Double click ListBox1

Add ListBox2

Change Text Property of Button1

Event
Button_Click

Copy Item from ListBox1 to ListBox2

Event
Button_Click

Moving Item from ListBox1 to ListBox2

Clear all Items

Event
Button_Click

Edit selected Item

Event
Button_Click

Error
[Link]([Link]) = [Link] [Link]
White Red Black yellow

[Link]
0 1 2 3

No selection made mean [Link] = -1 , this

value will produce an Error.

Copy selected Item to Textbox

Event
ListBox1_SelectedIndexChanged

Replace ListBox by CheckedListBox

Event
Button_Click

Get all items in message box

Code illustration
Dim X As New [Link] For I = 0 To 3 [Link]([Link](I)) [Link](" ") Next [Link]([Link]())
[Link] StringBuilder NameSpace Class

Append(item)
ToString

Append (String)
Method

Modify Last Code


Dim X As New [Link] For Each item In [Link] [Link](item) [Link](" ") items spaces

Next
[Link]([Link]())
[Link] StringBuilder Items Append(item) NameSpace Class Property Append (String)

ToString

Method

Code illustration
NameSpace Class Property Append (String) container for a set of identifiers (names) A set of instance information for a real content. Property Appends a copy of the specified string to this instance. convert the StringBuilder object to a String object before you can pass the string represented by the StringBuilder object to the user interface.

ToString (Method)

You might also like