文件名称:ListView
- 所属分类:
- 系统编程
- 资源属性:
- [Windows] [Visual C] [Basic/ASP] [源码]
- 上传时间:
- 2013-07-16
- 文件大小:
- 4kb
- 下载次数:
- 0次
- 提 供 者:
- 曾*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
VB使用ListView控件改进一个文件浏览器的功能,使其变为“增强版”,将文件的标题、列表项目序号、文件大小,创建时间等属性信息都显示出来,核心代码:Me.Top = (Screen.Height - Me.Height) / 2窗体位置在屏幕中间,以下代码为ListView1添加标题栏:
ListView1.ColumnHeaders.Add , , "文件名称", ListView1.Width / 3, 0
第一个标题栏是"文件名称",长度为ListView1宽度的三分之一 , 文字左对齐
Set clmX = ListView1.ColumnHeaders.Add(, , "序号", ListView1.Width / 6, 2)
第二个标题栏是"序号"
Set clmX = ListView1.ColumnHeaders.Add(, , "文件大小", ListView1.Width / 4, 1)
第三个标题栏是"文件大小"
Set clmX = ListView1.ColumnHeaders.Add(, , "创建时间", ListView1.Width / 3, 0)
第四个标题栏是"创建时间"
ListView1.SmallIcons = ImageList1
关联ImageList1中的图标-VB ListView control to improve the function of a file browser, so that it becomes " Enhanced Edition" , the title of the document, a list of item numbers, file size, creation time and other attribute information are displayed, the core code: Me.Top = ( Screen.Height- Me.Height)/2 position in the middle of the screen form, add the following code to ListView1 title bar: ListView1.ColumnHeaders.Add,, " File name" , ListView1.Width/3, 0 is the first title bar " File Name" , the length of one third of the width ListView1, text to the left Set clmX = ListView1.ColumnHeaders.Add (,, " number" , ListView1.Width/6, 2) the second column is the title " number" Set clmX = ListView1.ColumnHeaders.Add (,, " File Size" , ListView1.Width/4, 1) is the third title bar " file size" Set clmX = ListView1.ColumnHeaders.Add (,, " creation time" ListView1.Width/3, 0) is the fourth title bar " Create Time" ListView1.SmallIcons = ImageL
ListView1.ColumnHeaders.Add , , "文件名称", ListView1.Width / 3, 0
第一个标题栏是"文件名称",长度为ListView1宽度的三分之一 , 文字左对齐
Set clmX = ListView1.ColumnHeaders.Add(, , "序号", ListView1.Width / 6, 2)
第二个标题栏是"序号"
Set clmX = ListView1.ColumnHeaders.Add(, , "文件大小", ListView1.Width / 4, 1)
第三个标题栏是"文件大小"
Set clmX = ListView1.ColumnHeaders.Add(, , "创建时间", ListView1.Width / 3, 0)
第四个标题栏是"创建时间"
ListView1.SmallIcons = ImageList1
关联ImageList1中的图标-VB ListView control to improve the function of a file browser, so that it becomes " Enhanced Edition" , the title of the document, a list of item numbers, file size, creation time and other attribute information are displayed, the core code: Me.Top = ( Screen.Height- Me.Height)/2 position in the middle of the screen form, add the following code to ListView1 title bar: ListView1.ColumnHeaders.Add,, " File name" , ListView1.Width/3, 0 is the first title bar " File Name" , the length of one third of the width ListView1, text to the left Set clmX = ListView1.ColumnHeaders.Add (,, " number" , ListView1.Width/6, 2) the second column is the title " number" Set clmX = ListView1.ColumnHeaders.Add (,, " File Size" , ListView1.Width/4, 1) is the third title bar " file size" Set clmX = ListView1.ColumnHeaders.Add (,, " creation time" ListView1.Width/3, 0) is the fourth title bar " Create Time" ListView1.SmallIcons = ImageL
(系统自动生成,下载前可以参看下载内容)
下载文件列表
ListView\1.ico
........\Form1.frm
........\Form1.frx
........\工程1.vbp
........\工程1.vbw
ListView