If the Icon.ExtractAssociatedIcon(filePath) only way to get badges in .NET && is if it doesn't work for disks and directories (right?), Then how are you going to get badges for them?
In other words, I would like
foreach (string driveName in Directory.GetLogicalDrives())
{
using (System.Drawing.Icon systemIcon = System.Drawing.Icon.ExtractAssociatedIcon(driveName))
{ ... }
}
^ this obviously does not work (only works for files)
I am not sure if System.IO.Directory.Exists(file)this is the correct way to detect the presence of disks ...
source
share