<?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_by_API%2FSystem.Windows.Forms%2FListViewItem</id>
		<title>VB.Net by API/System.Windows.Forms/ListViewItem - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net_by_API%2FSystem.Windows.Forms%2FListViewItem"/>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_by_API/System.Windows.Forms/ListViewItem&amp;action=history"/>
		<updated>2026-04-06T00:15:55Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net_by_API/System.Windows.Forms/ListViewItem&amp;diff=2766&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_by_API/System.Windows.Forms/ListViewItem&amp;diff=2766&amp;oldid=prev"/>
				<updated>2010-05-26T16:40:16Z</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_by_API/System.Windows.Forms/ListViewItem&amp;diff=2767&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_by_API/System.Windows.Forms/ListViewItem&amp;diff=2767&amp;oldid=prev"/>
				<updated>2010-05-26T12:52:26Z</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;==ListViewItem.ImageIndex==&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.Collections&lt;br /&gt;
Imports System.Data&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Imports System.ruponentModel&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System.IO&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;
&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;
    Friend WithEvents cmdFillList As System.Windows.Forms.Button&lt;br /&gt;
    Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox&lt;br /&gt;
    Friend WithEvents optSmallIcon As System.Windows.Forms.RadioButton&lt;br /&gt;
    Friend WithEvents optLargeIcon As System.Windows.Forms.RadioButton&lt;br /&gt;
    Friend WithEvents optDetails As System.Windows.Forms.RadioButton&lt;br /&gt;
    Friend WithEvents optList As System.Windows.Forms.RadioButton&lt;br /&gt;
    Friend WithEvents listAuthors As System.Windows.Forms.ListView&lt;br /&gt;
    Private components As System.ruponentModel.IContainer&lt;br /&gt;
    &amp;quot;Required by the Windows Form Designer&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.ruponents = New System.ruponentModel.Container()&lt;br /&gt;
        Me.GroupBox1 = New System.Windows.Forms.GroupBox()&lt;br /&gt;
        Me.optLargeIcon = New System.Windows.Forms.RadioButton()&lt;br /&gt;
        Me.optList = New System.Windows.Forms.RadioButton()&lt;br /&gt;
        Me.optDetails = New System.Windows.Forms.RadioButton()&lt;br /&gt;
        Me.optSmallIcon = New System.Windows.Forms.RadioButton()&lt;br /&gt;
        Me.listAuthors = New System.Windows.Forms.ListView()&lt;br /&gt;
        Me.cmdFillList = New System.Windows.Forms.Button()&lt;br /&gt;
        Me.GroupBox1.SuspendLayout()&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;GroupBox1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.GroupBox1.Anchor = (System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right)&lt;br /&gt;
        Me.GroupBox1.Controls.AddRange(New System.Windows.Forms.Control() {Me.optLargeIcon, Me.optList, Me.optDetails, Me.optSmallIcon})&lt;br /&gt;
        Me.GroupBox1.FlatStyle = System.Windows.Forms.FlatStyle.System&lt;br /&gt;
        Me.GroupBox1.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.GroupBox1.Location = New System.Drawing.Point(276, 12)&lt;br /&gt;
        Me.GroupBox1.Name = &amp;quot;GroupBox1&amp;quot;&lt;br /&gt;
        Me.GroupBox1.Size = New System.Drawing.Size(104, 132)&lt;br /&gt;
        Me.GroupBox1.TabIndex = 2&lt;br /&gt;
        Me.GroupBox1.TabStop = False&lt;br /&gt;
        Me.GroupBox1.Text = &amp;quot;View&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;optLargeIcon&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.optLargeIcon.Checked = True&lt;br /&gt;
        Me.optLargeIcon.FlatStyle = System.Windows.Forms.FlatStyle.System&lt;br /&gt;
        Me.optLargeIcon.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.optLargeIcon.Location = New System.Drawing.Point(16, 48)&lt;br /&gt;
        Me.optLargeIcon.Name = &amp;quot;optLargeIcon&amp;quot;&lt;br /&gt;
        Me.optLargeIcon.Size = New System.Drawing.Size(76, 16)&lt;br /&gt;
        Me.optLargeIcon.TabIndex = 0&lt;br /&gt;
        Me.optLargeIcon.TabStop = True&lt;br /&gt;
        Me.optLargeIcon.Text = &amp;quot;LargeIcon&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;optList&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.optList.FlatStyle = System.Windows.Forms.FlatStyle.System&lt;br /&gt;
        Me.optList.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.optList.Location = New System.Drawing.Point(16, 96)&lt;br /&gt;
        Me.optList.Name = &amp;quot;optList&amp;quot;&lt;br /&gt;
        Me.optList.Size = New System.Drawing.Size(56, 16)&lt;br /&gt;
        Me.optList.TabIndex = 0&lt;br /&gt;
        Me.optList.Text = &amp;quot;List&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;optDetails&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.optDetails.FlatStyle = System.Windows.Forms.FlatStyle.System&lt;br /&gt;
        Me.optDetails.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.optDetails.Location = New System.Drawing.Point(16, 72)&lt;br /&gt;
        Me.optDetails.Name = &amp;quot;optDetails&amp;quot;&lt;br /&gt;
        Me.optDetails.Size = New System.Drawing.Size(72, 16)&lt;br /&gt;
        Me.optDetails.TabIndex = 0&lt;br /&gt;
        Me.optDetails.Text = &amp;quot;Details&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;optSmallIcon&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.optSmallIcon.FlatStyle = System.Windows.Forms.FlatStyle.System&lt;br /&gt;
        Me.optSmallIcon.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.optSmallIcon.Location = New System.Drawing.Point(16, 24)&lt;br /&gt;
        Me.optSmallIcon.Name = &amp;quot;optSmallIcon&amp;quot;&lt;br /&gt;
        Me.optSmallIcon.Size = New System.Drawing.Size(72, 16)&lt;br /&gt;
        Me.optSmallIcon.TabIndex = 0&lt;br /&gt;
        Me.optSmallIcon.Text = &amp;quot;SmallIcon&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;listAuthors&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.listAuthors.Activation = System.Windows.Forms.ItemActivation.OneClick&lt;br /&gt;
        Me.listAuthors.AllowColumnReorder = True&lt;br /&gt;
        Me.listAuthors.Anchor = (((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _&lt;br /&gt;
                    Or System.Windows.Forms.AnchorStyles.Left) _&lt;br /&gt;
                    Or System.Windows.Forms.AnchorStyles.Right)&lt;br /&gt;
        Me.listAuthors.GridLines = True&lt;br /&gt;
        Me.listAuthors.HoverSelection = True&lt;br /&gt;
        Me.listAuthors.Location = New System.Drawing.Point(8, 8)&lt;br /&gt;
        Me.listAuthors.Name = &amp;quot;listAuthors&amp;quot;&lt;br /&gt;
        Me.listAuthors.Size = New System.Drawing.Size(260, 332)&lt;br /&gt;
        Me.listAuthors.Sorting = System.Windows.Forms.SortOrder.Ascending&lt;br /&gt;
        Me.listAuthors.TabIndex = 0&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;cmdFillList&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.cmdFillList.Anchor = (System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right)&lt;br /&gt;
        Me.cmdFillList.FlatStyle = System.Windows.Forms.FlatStyle.System&lt;br /&gt;
        Me.cmdFillList.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.cmdFillList.Location = New System.Drawing.Point(276, 152)&lt;br /&gt;
        Me.cmdFillList.Name = &amp;quot;cmdFillList&amp;quot;&lt;br /&gt;
        Me.cmdFillList.Size = New System.Drawing.Size(104, 24)&lt;br /&gt;
        Me.cmdFillList.TabIndex = 1&lt;br /&gt;
        Me.cmdFillList.Text = &amp;quot;Fill List&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;ListViewExample&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(388, 349)&lt;br /&gt;
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.GroupBox1, Me.cmdFillList, Me.listAuthors})&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;ListViewExample&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;ListView Example&amp;quot;&lt;br /&gt;
        Me.GroupBox1.ResumeLayout(False)&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
    End Sub&lt;br /&gt;
#End Region&lt;br /&gt;
&lt;br /&gt;
    Private Sub cmdFillList_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdFillList.Click&lt;br /&gt;
        listAuthors.BeginUpdate()&lt;br /&gt;
        Dim dt As DataTable = StoreDB.GetProducts()&lt;br /&gt;
        Dim dr As DataRow&lt;br /&gt;
        For Each dr In dt.Rows&lt;br /&gt;
            Dim listItem As New ListViewItem(dr(&amp;quot;book&amp;quot;).ToString)&lt;br /&gt;
            listItem.ImageIndex = 0&lt;br /&gt;
            listItem.SubItems.Add(dr(&amp;quot;title&amp;quot;))&lt;br /&gt;
            listAuthors.Items.Add(listItem)&lt;br /&gt;
        Next&lt;br /&gt;
        listAuthors.Columns.Add(&amp;quot;title&amp;quot;, 100, HorizontalAlignment.Left)&lt;br /&gt;
        listAuthors.EndUpdate()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub NewView(ByVal sender As System.Object, ByVal e As System.EventArgs) _&lt;br /&gt;
 Handles optSmallIcon.CheckedChanged, optDetails.CheckedChanged, _&lt;br /&gt;
 optLargeIcon.CheckedChanged, optList.CheckedChanged&lt;br /&gt;
        listAuthors.View = CType(sender, Control).Tag&lt;br /&gt;
        Me.Text = &amp;quot;Using View: &amp;quot; &amp;amp; listAuthors.View.ToString&lt;br /&gt;
    End Sub&lt;br /&gt;
&lt;br /&gt;
    Private Sub ListViewExample_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;
        optLargeIcon.Tag = View.LargeIcon&lt;br /&gt;
        optSmallIcon.Tag = View.SmallIcon&lt;br /&gt;
        optDetails.Tag = View.Details&lt;br /&gt;
        optList.Tag = View.List&lt;br /&gt;
        Call cmdFillList_Click(Nothing, Nothing)&lt;br /&gt;
    End Sub&lt;br /&gt;
&lt;br /&gt;
    Private Sub listAuthors_ColumnClick(ByVal sender As Object, ByVal e As System.Windows.Forms.ColumnClickEventArgs) Handles listAuthors.ColumnClick&lt;br /&gt;
        listAuthors.ListViewItemSorter = New CompareListViewItems(e.Column)&lt;br /&gt;
        listAuthors.Sort()&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
Public Class CompareListViewItems&lt;br /&gt;
    Implements IComparer&lt;br /&gt;
    Public ReadOnly Column As Integer&lt;br /&gt;
    Public Sub New(ByVal columnIndex As Integer)&lt;br /&gt;
        Column = columnIndex&lt;br /&gt;
    End Sub&lt;br /&gt;
    Public Function Compare(ByVal x As Object, ByVal y As Object) As Integer Implements System.Collections.IComparer.rupare&lt;br /&gt;
        Dim ListX As ListViewItem = CType(x, ListViewItem)&lt;br /&gt;
        Dim ListY As ListViewItem = CType(y, ListViewItem)&lt;br /&gt;
        If ListX.SubItems(Column).Text &amp;gt; ListY.SubItems(Column).Text Then&lt;br /&gt;
            Return 1&lt;br /&gt;
        ElseIf ListX.SubItems(Column).Text = ListY.SubItems(Column).Text Then&lt;br /&gt;
            Return 0&lt;br /&gt;
        Else&lt;br /&gt;
            Return -1&lt;br /&gt;
        End If&lt;br /&gt;
    End Function&lt;br /&gt;
End Class&lt;br /&gt;
Public Class StoreDB&lt;br /&gt;
    Public Shared Function GetProducts() As DataTable&lt;br /&gt;
        Dim dsStore As New DataSet()&lt;br /&gt;
        dsStore.ReadXmlSchema(&amp;quot;book.xdr&amp;quot;)&lt;br /&gt;
        dsStore.ReadXml(&amp;quot;book.xml&amp;quot;)&lt;br /&gt;
        Return dsStore.Tables(&amp;quot;books&amp;quot;)&lt;br /&gt;
    End Function&lt;br /&gt;
&lt;br /&gt;
End Class&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==ListViewItem.SubItems.Add==&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;
&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
public class ListViewIllustration&lt;br /&gt;
   public Shared Sub Main&lt;br /&gt;
        Application.Run(New Form1)&lt;br /&gt;
   End Sub&lt;br /&gt;
End class&lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Private Sub btnPopulate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPopulate.Click&lt;br /&gt;
        Dim intWidth As Integer&lt;br /&gt;
        Dim objItem As ListViewItem&lt;br /&gt;
        &amp;quot;Set the default view.&lt;br /&gt;
        ListView1.View = View.Details&lt;br /&gt;
        optDetails.Checked = True&lt;br /&gt;
        &amp;quot;Add the column headers.&lt;br /&gt;
        intWidth = ListView1.Width - 5&lt;br /&gt;
        ListView1.Columns.Add(&amp;quot;Name&amp;quot;, CInt(intWidth / 4))&lt;br /&gt;
        ListView1.Columns.Add(&amp;quot;Address&amp;quot;, CInt(intWidth / 4))&lt;br /&gt;
        ListView1.Columns.Add(&amp;quot;Phone&amp;quot;, CInt(intWidth / 4))&lt;br /&gt;
        ListView1.Columns.Add(&amp;quot;FAX&amp;quot;, CInt(intWidth / 4))&lt;br /&gt;
        &amp;quot;Add some list view items.&lt;br /&gt;
        objItem = ListView1.Items.Add(&amp;quot;AAAAA&amp;quot;)&lt;br /&gt;
        With objItem&lt;br /&gt;
            .SubItems.Add(&amp;quot;123 Main St.&amp;quot;)&lt;br /&gt;
            .SubItems.Add(&amp;quot;555-555-5555&amp;quot;)&lt;br /&gt;
            .SubItems.Add(&amp;quot;555-555-5555&amp;quot;)&lt;br /&gt;
            .ImageIndex = 0&lt;br /&gt;
        End With&lt;br /&gt;
        objItem = ListView1.Items.Add(&amp;quot;BBBBB&amp;quot;)&lt;br /&gt;
        With objItem&lt;br /&gt;
            .SubItems.Add(&amp;quot;456 Main St.&amp;quot;)&lt;br /&gt;
            .SubItems.Add(&amp;quot;555-555-5555&amp;quot;)&lt;br /&gt;
            .SubItems.Add(&amp;quot;555-555-5555&amp;quot;)&lt;br /&gt;
            .ImageIndex = 0&lt;br /&gt;
        End With&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click&lt;br /&gt;
        Dim strItemText As String&lt;br /&gt;
        Dim objItem As ListViewItem&lt;br /&gt;
        &amp;quot;Add some list view items.&lt;br /&gt;
        strItemText = &amp;quot;name:&amp;quot;&lt;br /&gt;
        objItem = ListView1.Items.Add(strItemText)&lt;br /&gt;
        With objItem&lt;br /&gt;
            .SubItems.Add(&amp;quot;123 Some St.&amp;quot;)&lt;br /&gt;
            .SubItems.Add(&amp;quot;555-555-5555&amp;quot;)&lt;br /&gt;
            .SubItems.Add(&amp;quot;555-555-5555&amp;quot;)&lt;br /&gt;
            .ImageIndex = 0&lt;br /&gt;
        End With&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click&lt;br /&gt;
        ListView1.Items.Clear()&lt;br /&gt;
    End Sub&lt;br /&gt;
    &lt;br /&gt;
    Private Sub btnRemove_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRemove.Click&lt;br /&gt;
        Dim objListItem As ListViewItem&lt;br /&gt;
        For Each objListItem In ListView1.SelectedItems&lt;br /&gt;
            objListItem.Remove()&lt;br /&gt;
        Next objListItem&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub btnDisplayItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisplayItem.Click&lt;br /&gt;
        Dim strMessage As String&lt;br /&gt;
        Dim objListItem As ListViewItem&lt;br /&gt;
        If ListView1.SelectedItems.Count &amp;gt; 0 Then&lt;br /&gt;
            objListItem = ListView1.SelectedItems(0)&lt;br /&gt;
            With objListItem&lt;br /&gt;
                strMessage = &amp;quot;NAME: &amp;quot; &amp;amp; .Text &amp;amp; vbCrLf &amp;amp; _&lt;br /&gt;
                             &amp;quot;ADDRESS: &amp;quot; &amp;amp; .SubItems(1).Text &amp;amp; vbCrLf &amp;amp; _&lt;br /&gt;
                             &amp;quot;PHONE: &amp;quot; &amp;amp; .SubItems(2).Text &amp;amp; vbCrLf &amp;amp; _&lt;br /&gt;
                             &amp;quot;FAX: &amp;quot; &amp;amp; .SubItems(3).Text&lt;br /&gt;
            End With&lt;br /&gt;
            MsgBox(strMessage)&lt;br /&gt;
        End If&lt;br /&gt;
    End Sub&lt;br /&gt;
   &lt;br /&gt;
    Private Sub optLargeIcon_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles optLargeIcon.CheckedChanged&lt;br /&gt;
        ListView1.View = View.LargeIcon&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub optSmallIcon_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles optSmallIcon.CheckedChanged&lt;br /&gt;
        ListView1.View = View.SmallIcon&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub optList_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles optList.CheckedChanged&lt;br /&gt;
        ListView1.View = View.List&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub optTile_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles optTile.CheckedChanged&lt;br /&gt;
        ListView1.View = View.Tile&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub optDetails_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles optDetails.CheckedChanged&lt;br /&gt;
        ListView1.View = View.Details&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
Partial Public Class Form1&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerNonUserCode()&amp;gt; _&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;
    End Sub&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.ruponents = New System.ruponentModel.Container&lt;br /&gt;
        Me.ListView1 = New System.Windows.Forms.ListView&lt;br /&gt;
        Me.btnPopulate = New System.Windows.Forms.Button&lt;br /&gt;
        Me.GroupBox1 = New System.Windows.Forms.GroupBox&lt;br /&gt;
        Me.optDetails = New System.Windows.Forms.RadioButton&lt;br /&gt;
        Me.optTile = New System.Windows.Forms.RadioButton&lt;br /&gt;
        Me.optList = New System.Windows.Forms.RadioButton&lt;br /&gt;
        Me.optSmallIcon = New System.Windows.Forms.RadioButton&lt;br /&gt;
        Me.optLargeIcon = New System.Windows.Forms.RadioButton&lt;br /&gt;
        Me.btnAdd = New System.Windows.Forms.Button&lt;br /&gt;
        Me.btnRemove = New System.Windows.Forms.Button&lt;br /&gt;
        Me.btnClear = New System.Windows.Forms.Button&lt;br /&gt;
        Me.btnDisplayItem = New System.Windows.Forms.Button&lt;br /&gt;
        Me.GroupBox1.SuspendLayout()&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;ListView1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.ListView1.FullRowSelect = True&lt;br /&gt;
        Me.ListView1.Location = New System.Drawing.Point(17, 18)&lt;br /&gt;
        Me.ListView1.Name = &amp;quot;ListView1&amp;quot;&lt;br /&gt;
        Me.ListView1.Size = New System.Drawing.Size(342, 364)&lt;br /&gt;
        Me.ListView1.TabIndex = 0&lt;br /&gt;
        Me.ListView1.UseCompatibleStateImageBehavior = False&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;btnPopulate&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.btnPopulate.Location = New System.Drawing.Point(366, 239)&lt;br /&gt;
        Me.btnPopulate.Name = &amp;quot;btnPopulate&amp;quot;&lt;br /&gt;
        Me.btnPopulate.Size = New System.Drawing.Size(161, 23)&lt;br /&gt;
        Me.btnPopulate.TabIndex = 2&lt;br /&gt;
        Me.btnPopulate.Text = &amp;quot;Populate&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;GroupBox1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.GroupBox1.Controls.Add(Me.optDetails)&lt;br /&gt;
        Me.GroupBox1.Controls.Add(Me.optTile)&lt;br /&gt;
        Me.GroupBox1.Controls.Add(Me.optList)&lt;br /&gt;
        Me.GroupBox1.Controls.Add(Me.optSmallIcon)&lt;br /&gt;
        Me.GroupBox1.Controls.Add(Me.optLargeIcon)&lt;br /&gt;
        Me.GroupBox1.Location = New System.Drawing.Point(370, 13)&lt;br /&gt;
        Me.GroupBox1.Name = &amp;quot;GroupBox1&amp;quot;&lt;br /&gt;
        Me.GroupBox1.Size = New System.Drawing.Size(156, 166)&lt;br /&gt;
        Me.GroupBox1.TabIndex = 1&lt;br /&gt;
        Me.GroupBox1.TabStop = False&lt;br /&gt;
        Me.GroupBox1.Text = &amp;quot;Views&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;optDetails&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.optDetails.AutoSize = True&lt;br /&gt;
        Me.optDetails.Location = New System.Drawing.Point(30, 126)&lt;br /&gt;
        Me.optDetails.Name = &amp;quot;optDetails&amp;quot;&lt;br /&gt;
        Me.optDetails.Size = New System.Drawing.Size(57, 17)&lt;br /&gt;
        Me.optDetails.TabIndex = 4&lt;br /&gt;
        Me.optDetails.Text = &amp;quot;Details&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;optTile&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.optTile.AutoSize = True&lt;br /&gt;
        Me.optTile.Location = New System.Drawing.Point(30, 102)&lt;br /&gt;
        Me.optTile.Name = &amp;quot;optTile&amp;quot;&lt;br /&gt;
        Me.optTile.Size = New System.Drawing.Size(42, 17)&lt;br /&gt;
        Me.optTile.TabIndex = 3&lt;br /&gt;
        Me.optTile.Text = &amp;quot;Tile&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;optList&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.optList.AutoSize = True&lt;br /&gt;
        Me.optList.Location = New System.Drawing.Point(30, 78)&lt;br /&gt;
        Me.optList.Name = &amp;quot;optList&amp;quot;&lt;br /&gt;
        Me.optList.Size = New System.Drawing.Size(41, 17)&lt;br /&gt;
        Me.optList.TabIndex = 2&lt;br /&gt;
        Me.optList.Text = &amp;quot;List&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;optSmallIcon&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.optSmallIcon.AutoSize = True&lt;br /&gt;
        Me.optSmallIcon.Location = New System.Drawing.Point(30, 54)&lt;br /&gt;
        Me.optSmallIcon.Name = &amp;quot;optSmallIcon&amp;quot;&lt;br /&gt;
        Me.optSmallIcon.Size = New System.Drawing.Size(79, 17)&lt;br /&gt;
        Me.optSmallIcon.TabIndex = 1&lt;br /&gt;
        Me.optSmallIcon.Text = &amp;quot;Small Icons&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;optLargeIcon&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.optLargeIcon.AutoSize = True&lt;br /&gt;
        Me.optLargeIcon.Location = New System.Drawing.Point(30, 30)&lt;br /&gt;
        Me.optLargeIcon.Name = &amp;quot;optLargeIcon&amp;quot;&lt;br /&gt;
        Me.optLargeIcon.Size = New System.Drawing.Size(81, 17)&lt;br /&gt;
        Me.optLargeIcon.TabIndex = 0&lt;br /&gt;
        Me.optLargeIcon.Text = &amp;quot;Large Icons&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;btnAdd&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.btnAdd.Location = New System.Drawing.Point(365, 269)&lt;br /&gt;
        Me.btnAdd.Name = &amp;quot;btnAdd&amp;quot;&lt;br /&gt;
        Me.btnAdd.Size = New System.Drawing.Size(161, 23)&lt;br /&gt;
        Me.btnAdd.TabIndex = 3&lt;br /&gt;
        Me.btnAdd.Text = &amp;quot;Add&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;btnRemove&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.btnRemove.Location = New System.Drawing.Point(366, 299)&lt;br /&gt;
        Me.btnRemove.Name = &amp;quot;btnRemove&amp;quot;&lt;br /&gt;
        Me.btnRemove.Size = New System.Drawing.Size(161, 23)&lt;br /&gt;
        Me.btnRemove.TabIndex = 4&lt;br /&gt;
        Me.btnRemove.Text = &amp;quot;Remove&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;btnClear&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.btnClear.Location = New System.Drawing.Point(365, 329)&lt;br /&gt;
        Me.btnClear.Name = &amp;quot;btnClear&amp;quot;&lt;br /&gt;
        Me.btnClear.Size = New System.Drawing.Size(161, 23)&lt;br /&gt;
        Me.btnClear.TabIndex = 5&lt;br /&gt;
        Me.btnClear.Text = &amp;quot;Clear&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;btnDisplayItem&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.btnDisplayItem.Location = New System.Drawing.Point(365, 359)&lt;br /&gt;
        Me.btnDisplayItem.Name = &amp;quot;btnDisplayItem&amp;quot;&lt;br /&gt;
        Me.btnDisplayItem.Size = New System.Drawing.Size(161, 23)&lt;br /&gt;
        Me.btnDisplayItem.TabIndex = 6&lt;br /&gt;
        Me.btnDisplayItem.Text = &amp;quot;Display Item&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(539, 394)&lt;br /&gt;
        Me.Controls.Add(Me.btnDisplayItem)&lt;br /&gt;
        Me.Controls.Add(Me.btnClear)&lt;br /&gt;
        Me.Controls.Add(Me.btnRemove)&lt;br /&gt;
        Me.Controls.Add(Me.btnAdd)&lt;br /&gt;
        Me.Controls.Add(Me.GroupBox1)&lt;br /&gt;
        Me.Controls.Add(Me.btnPopulate)&lt;br /&gt;
        Me.Controls.Add(Me.ListView1)&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen&lt;br /&gt;
        Me.Text = &amp;quot;ListView&amp;quot;&lt;br /&gt;
        Me.GroupBox1.ResumeLayout(False)&lt;br /&gt;
        Me.GroupBox1.PerformLayout()&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Friend WithEvents ListView1 As System.Windows.Forms.ListView&lt;br /&gt;
    Friend WithEvents btnPopulate As System.Windows.Forms.Button&lt;br /&gt;
    Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox&lt;br /&gt;
    Friend WithEvents optDetails As System.Windows.Forms.RadioButton&lt;br /&gt;
    Friend WithEvents optTile As System.Windows.Forms.RadioButton&lt;br /&gt;
    Friend WithEvents optList As System.Windows.Forms.RadioButton&lt;br /&gt;
    Friend WithEvents optSmallIcon As System.Windows.Forms.RadioButton&lt;br /&gt;
    Friend WithEvents optLargeIcon As System.Windows.Forms.RadioButton&lt;br /&gt;
    Friend WithEvents btnAdd As System.Windows.Forms.Button&lt;br /&gt;
    Friend WithEvents btnRemove As System.Windows.Forms.Button&lt;br /&gt;
    Friend WithEvents btnClear As System.Windows.Forms.Button&lt;br /&gt;
    Friend WithEvents btnDisplayItem As System.Windows.Forms.Button&lt;br /&gt;
    Friend WithEvents ImageList1 As System.Windows.Forms.ImageList&lt;br /&gt;
End Class&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>