APP_ImageList.Images.Add(Drawing.Icon.ExtractAssociatedIcon(F.FullName))
Private Sub Application_Fixes_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Dir As New DirectoryInfo("\\mcusquanfs01\nrfz helpdesk\RDM_NRFK_WN7\Synergy Lite\Static_Fixes\Application\") Application_Fixes_List(Dir) End Sub Private Sub Application_Fixes_List(ByVal Folder As DirectoryInfo) Static APP_ImageList As New ImageList With {.ColorDepth = ColorDepth.Depth32Bit, .ImageSize = New Size(20, 20)} Static ImgIndex As Integer = 0 Application_Fixes_ListView.LargeImageList = APP_ImageList Application_Fixes_ListView.View = View.Tile For Each F As FileInfo In Folder.GetFiles("*.vbs") APP_ImageList.Images.Add(Drawing.Icon.ExtractAssociatedIcon(F.FullName)) Application_Fixes_ListView.Items.Add(F.Name, ImgIndex) ImgIndex += 1 Next For Each F As FileInfo In Folder.GetFiles("*.bat") APP_ImageList.Images.Add(Drawing.Icon.ExtractAssociatedIcon(F.FullName)) Application_Fixes_ListView.Items.Add(F.Name, ImgIndex) ImgIndex += 1 Next For Each Dir As DirectoryInfo In Folder.GetDirectories Application_Fixes_List(Dir) Next End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)