<?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_Tutorial%2FGUI_Applications%2FFile_Listview</id>
		<title>VB.Net Tutorial/GUI Applications/File Listview - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net_Tutorial%2FGUI_Applications%2FFile_Listview"/>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/GUI_Applications/File_Listview&amp;action=history"/>
		<updated>2026-04-05T07:48:39Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net_Tutorial/GUI_Applications/File_Listview&amp;diff=3738&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_Tutorial/GUI_Applications/File_Listview&amp;diff=3738&amp;oldid=prev"/>
				<updated>2010-05-26T16:40:30Z</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_Tutorial/GUI_Applications/File_Listview&amp;diff=3739&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/GUI_Applications/File_Listview&amp;diff=3739&amp;oldid=prev"/>
				<updated>2010-05-26T12:56:31Z</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;==File Listview==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;&amp;quot;Visual Basic.Net JingCai Programming 100 Examples&lt;br /&gt;
&amp;quot;Author: Yong Zhang&lt;br /&gt;
&amp;quot;Publisher: Water Publisher China&lt;br /&gt;
&amp;quot;ISBN: 750841156&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;
Imports System.Runtime.InteropServices&lt;br /&gt;
Imports System.IO&lt;br /&gt;
public class FileListView&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;
&lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Dim nIndex As Integer = 0&lt;br /&gt;
    Private Sub CreateMyListView(ByVal dirpath As String)&lt;br /&gt;
        Dim hImgSmall As IntPtr&lt;br /&gt;
        Dim hImgLarge As IntPtr&lt;br /&gt;
        Dim shinfo As FileInfoClass.SHFILEINFO = New FileInfoClass.SHFILEINFO()&lt;br /&gt;
        ListView1.Clear()&lt;br /&gt;
        ImageListSmall.Images.Clear()&lt;br /&gt;
        ImageListLarge.Images.Clear()&lt;br /&gt;
        nIndex = 0&lt;br /&gt;
        ListView1.Columns.Add(&amp;quot;File Name&amp;quot;, 200, HorizontalAlignment.Left)&lt;br /&gt;
        ListView1.Columns.Add(&amp;quot;Size&amp;quot;, 100, HorizontalAlignment.Left)&lt;br /&gt;
        ListView1.Columns.Add(&amp;quot;Date&amp;quot;, 100, HorizontalAlignment.Left)&lt;br /&gt;
        ListView1.Columns.Add(&amp;quot;Attribute&amp;quot;, 100, HorizontalAlignment.Center)&lt;br /&gt;
        ListView1.LargeImageList = imageListLarge&lt;br /&gt;
        ListView1.SmallImageList = imageListSmall&lt;br /&gt;
        ListView1.View = View.Details&lt;br /&gt;
        ListView1.LabelEdit = True&lt;br /&gt;
        ListView1.AllowColumnReorder = True&lt;br /&gt;
        ListView1.CheckBoxes = True&lt;br /&gt;
        ListView1.FullRowSelect = True&lt;br /&gt;
        ListView1.GridLines = True&lt;br /&gt;
        ListView1.Sorting = SortOrder.Ascending&lt;br /&gt;
        Dim FilesInDir As String() = Directory.GetFiles(dirpath, &amp;quot;*.*&amp;quot;)&lt;br /&gt;
        Dim SFile As String&lt;br /&gt;
        Dim item1 As New ListViewItem(&amp;quot;&amp;quot;, 0)&lt;br /&gt;
        item1.SubItems.Add(&amp;quot;1&amp;quot;)&lt;br /&gt;
        item1.SubItems.Add(&amp;quot;2&amp;quot;)&lt;br /&gt;
        item1.SubItems.Add(&amp;quot;3&amp;quot;)&lt;br /&gt;
        Dim ctdate As Date&lt;br /&gt;
        Dim fAttr As FileAttribute&lt;br /&gt;
        For Each SFile In FilesInDir&lt;br /&gt;
            ctdate = IO.File.GetCreationTime(SFile)&lt;br /&gt;
            fAttr = IO.File.GetAttributes(SFile)&lt;br /&gt;
            shinfo.szDisplayName = New String(Chr(0), 260)&lt;br /&gt;
            shinfo.szTypeName = New String(Chr(0), 80)&lt;br /&gt;
            hImgSmall = FileInfoClass.SHGetFileInfo(SFile, 0, shinfo, _&lt;br /&gt;
                                    Marshal.SizeOf(shinfo), _&lt;br /&gt;
                                    FileInfoClass.SHGFI_ICON Or FileInfoClass.SHGFI_SMALLICON)&lt;br /&gt;
            ImageListSmall.Images.Add(System.Drawing.Icon.FromHandle(shinfo.hIcon))       &amp;quot;Add icon to smallimageList.&lt;br /&gt;
            hImgLarge = FileInfoClass.SHGetFileInfo(SFile, 0, shinfo, _&lt;br /&gt;
                                            Marshal.SizeOf(shinfo), _&lt;br /&gt;
                                            FileInfoClass.SHGFI_ICON Or FileInfoClass.SHGFI_LARGEICON)&lt;br /&gt;
            ImageListLarge.Images.Add(System.Drawing.Icon.FromHandle(shinfo.hIcon))       &amp;quot;Add icon to LargeimageList.&lt;br /&gt;
            ListView1.Items.Add(New ListViewItem(New String() {SFile, CStr(FileLen(SFile)), ctdate.ToString, fAttr.ToString}, nIndex))&lt;br /&gt;
            nIndex = nIndex + 1&lt;br /&gt;
        Next&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;
        Dim disks As String() = Directory.GetLogicalDrives&lt;br /&gt;
        Dim Sdisk As String&lt;br /&gt;
        ComboBox1.Items.Clear()&lt;br /&gt;
        For Each Sdisk In disks&lt;br /&gt;
            ComboBox1.Items.Add(Sdisk)&lt;br /&gt;
        Next&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged&lt;br /&gt;
        CreateMyListView(ComboBox1.Text)&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
Public Class FileInfoClass&lt;br /&gt;
    Public Structure SHFILEINFO&lt;br /&gt;
        Public hIcon As IntPtr            &lt;br /&gt;
        Public iIcon As Integer           &lt;br /&gt;
        Public dwAttributes As Integer    &lt;br /&gt;
        &amp;lt;MarshalAs(UnmanagedType.ByValTStr, SizeConst:=260)&amp;gt; _&lt;br /&gt;
        Public szDisplayName As String&lt;br /&gt;
        &amp;lt;MarshalAs(UnmanagedType.ByValTStr, SizeConst:=80)&amp;gt; _&lt;br /&gt;
        Public szTypeName As String&lt;br /&gt;
    End Structure&lt;br /&gt;
    Public Declare Auto Function SHGetFileInfo Lib &amp;quot;shell32.dll&amp;quot; _&lt;br /&gt;
            (ByVal pszPath As String, _&lt;br /&gt;
             ByVal dwFileAttributes As Integer, _&lt;br /&gt;
             ByRef psfi As SHFILEINFO, _&lt;br /&gt;
             ByVal cbFileInfo As Integer, _&lt;br /&gt;
             ByVal uFlags As Integer) As IntPtr&lt;br /&gt;
    Public Const SHGFI_ICON = &amp;amp;H100&lt;br /&gt;
    Public Const SHGFI_SMALLICON = &amp;amp;H1&lt;br /&gt;
    Public Const SHGFI_LARGEICON = &amp;amp;H0    &amp;quot; Large icon&lt;br /&gt;
End Class&lt;br /&gt;
&amp;lt;Global.Microsoft.VisualBasic.rupilerServices.DesignerGenerated()&amp;gt; _&lt;br /&gt;
Partial 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 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.ruboBox1 = New System.Windows.Forms.ruboBox&lt;br /&gt;
        Me.ListView1 = New System.Windows.Forms.ListView&lt;br /&gt;
        Me.ImageListSmall = New System.Windows.Forms.ImageList(Me.ruponents)&lt;br /&gt;
        Me.ImageListLarge = New System.Windows.Forms.ImageList(Me.ruponents)&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;ComboBox1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.ruboBox1.FormattingEnabled = True&lt;br /&gt;
        Me.ruboBox1.Location = New System.Drawing.Point(12, 3)&lt;br /&gt;
        Me.ruboBox1.Name = &amp;quot;ComboBox1&amp;quot;&lt;br /&gt;
        Me.ruboBox1.Size = New System.Drawing.Size(413, 20)&lt;br /&gt;
        Me.ruboBox1.TabIndex = 0&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;ListView1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.ListView1.Location = New System.Drawing.Point(12, 29)&lt;br /&gt;
        Me.ListView1.Name = &amp;quot;ListView1&amp;quot;&lt;br /&gt;
        Me.ListView1.Size = New System.Drawing.Size(413, 207)&lt;br /&gt;
        Me.ListView1.TabIndex = 1&lt;br /&gt;
        Me.ListView1.UseCompatibleStateImageBehavior = False&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;ImageListSmall&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.ImageListSmall.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit&lt;br /&gt;
        Me.ImageListSmall.ImageSize = New System.Drawing.Size(16, 16)&lt;br /&gt;
        Me.ImageListSmall.TransparentColor = System.Drawing.Color.Transparent&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;ImageListLarge&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.ImageListLarge.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit&lt;br /&gt;
        Me.ImageListLarge.ImageSize = New System.Drawing.Size(16, 16)&lt;br /&gt;
        Me.ImageListLarge.TransparentColor = System.Drawing.Color.Transparent&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!, 12.0!)&lt;br /&gt;
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(437, 246)&lt;br /&gt;
        Me.Controls.Add(Me.ListView1)&lt;br /&gt;
        Me.Controls.Add(Me.ruboBox1)&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Friend WithEvents ComboBox1 As System.Windows.Forms.ruboBox&lt;br /&gt;
    Friend WithEvents ListView1 As System.Windows.Forms.ListView&lt;br /&gt;
    Friend WithEvents ImageListSmall As System.Windows.Forms.ImageList&lt;br /&gt;
    Friend WithEvents ImageListLarge As System.Windows.Forms.ImageList&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>