There is only one identical icon for local drives. It can Drive icons can be retrieved using the
Icon.ExtractAssociatedIcon Method (String) (System.Drawing)[
^] by passing a drive string without path like "C:".
To add icons to a list view, you need to create an
ImageList
, add the icons to that list, and set the corresponding key that has been used to add the icon to the image list when adding the list view item. A C# example can be found at
How to: Extract the Icon Associated with a File in Windows Forms | Microsoft Docs[
^] (old version with VB.Net code:
Gewusst wie: Extrahieren eines mit einer Datei verknüpften Symbols in Windows Forms[
^]; ignore the German title, the content is English).