1¡¢¼ÓÈëÒ»¸ölistview¿Ø¼þ£»
2¡¢Ö´ÐдúÂë
Dim lvw As WinForm.ListView = e.Form.Controls("ListView1")
lvw.StopRedraw() 'ÔÝÍ£»æÖÆ
lvw.Rows.Clear() 'Çå³ýÔÀ´µÄÐÐ
lvw.Images.Clear() 'Çå³ýÔÀ´µÄͼƬ
lvw.View = ViewMode.LargeIcon 'ÏÔʾģʽΪ´óͼ±ê
lvw.Images.LargeSize = New Size(130,150) '¶¨Òå´óͼ±ê³ß´ç
Dim dir As new io.DirectoryInfo(ProjectPath & "images\")
Dim files = dir.getfiles("*" & e.Form.Controls("²éÕÒ").text & "*")
For Each file As object In files
msgbox(file.name)
Dim Key As String = file.name '»ñÈ¡´ËÔ±¹¤µÄÕÕƬÎļþ
lvw.Images.AddLargeImage(Key, Key) 'Ìí¼ÓÕÕƬ,Ö±½ÓÓÃÎļþÃû×÷ΪͼƬ¼üÖµ
Dim vr As WinForm.ListViewRow = lvw.Rows.Add() 'Ôö¼ÓÒ»ÐÐ
vr.Text = file.name 'ÉèÖñêÌâ
vr.ImageKey = Key 'ÉèÖÃͼƬ¼üÖµ
Next
lvw.ResumeRedraw() '»Ö¸´»æÖÆ