[RESOLVED] [VB.NET] Windows 8 Start Menu Mimic
https://www.vbforums.com/images/ieimages/2021/05/3.png
I was looking at some listview functions and looking for some tutorials that can extract the real icon of an application, but I couldn't put the program's icon in a listview in the case of a folder.
My problems found themselves:
The names of the files are left with three dots after a certain size. How can you increase this limit of displayed characters?
Another problem is to drag the icons to change places in VB6 it is possible to change the order but I was unable to drag and drop the app anywhere else on vb.net I tried to create it manually but it took some work.
And the main problem is capturing the real build program icon.
I find it about:
Get icon any size only ink:https://www.vbforums.com/showthread....on-be-any-size
How to Get process icon at taskmanager:https://social.msdn.microsoft.com/Fo...ing-vbnet-2008
About[ text limit size:https://www.lidorsystems.com/support...ze-column.aspx
About dragdrop: https://www.dreamincode.net/forums/t...ist-view-item/
Re: [VB.NET] Windows 8 Start Menu Mimic
Re: [VB.NET] Windows 8 Start Menu Mimic
Quote:
Originally Posted by
.paul.
The listview filename size link i can test it's i think that run.But about extract icon associated as not know how to convert it to c# or vb then i think use it but isn't runnin.
Code:
Class SurroundingClass
Private listView1 As ListView
Private imageList1 As ImageList
Public Sub ExtractAssociatedIconEx()
listView1 = New ListView()
imageList1 = New ImageList()
listView1.Location = New Point(37, 12)
listView1.Size = New Size(151, 262)
listView1.SmallImageList = imageList1
listView1.View = View.SmallIcon
Me.ClientSize = New System.Drawing.Size(292, 266)
Me.Controls.Add(Me.listView1)
Me.Text = "Form1"
Dim dir As System.IO.DirectoryInfo = New System.IO.DirectoryInfo("c:\")
Dim item As ListViewItem
listView1.BeginUpdate()
For Each file As System.IO.FileInfo In dir.GetFiles()
Dim iconForFile As Icon = SystemIcons.WinLogo
item = New ListViewItem(file.Name, 1)
If Not imageList1.Images.ContainsKey(file.Extension) Then
iconForFile = System.Drawing.Icon.ExtractAssociatedIcon(file.FullName)
imageList1.Images.Add(file.Extension, iconForFile)
End If
item.ImageKey = file.Extension
listView1.Items.Add(item)
Next
listView1.EndUpdate()
End Sub
End Class