'==============以上是设置ftp路径======================
Dim lvw As WinForm.ListView = Forms("日常事务").Controls("ListView1")
Dim lsv = lvw.BaseControl
lsv.ListViewItemSorter = Nothing
lvw.Columns.Clear() '清除原来的列
lvw.Rows.Clear() '清除原来的行
lvw.Images.Clear() '清除原来的图片
lvw.View = ViewMode.Details '显示模式为详细信息
'lvw.GridLines = True '显示网格
Dim cls() As String = {"文件","修改日期","大小"} '定义列名
Dim wds() As Integer = {900,200,200} '定义列宽
For i As Integer = 0 To cls.Length - 1
Dim c As WinForm.ListViewColumn = lvw.Columns.Add()
c.Name = cls(i) '指定列名
c.Text = cls(i) '指定标题,这里标题和列名相同
c.Width = wds(i) '指定列宽
Next
lvw.Columns("文件").TextAlign = HorizontalAlignment.left '文件列靠左
lvw.Columns("修改日期").TextAlign = HorizontalAlignment.Right '日期列靠右对齐
lvw.Columns("大小").TextAlign = HorizontalAlignment.Right '大小列靠右对齐
'调用全局代码
lsv.ListViewItemSorter = new ListViewItemComparer(1,False)