public override ShellIcon GetIcon(bool open) { string ext = IconHelper.GetExtension(name); //Icon ic = IconHelper.GetFileIcon(ext, User32.IconSize.Small, false); //IntPtr hIcon = IconHelper.GetXLIcon(IconHelper.GetIconIndex(ext)); //Icon ic = (Icon)Icon.FromHandle(hIcon).Clone(); //User32.DestroyIcon(hIcon); // don't forget to cleanup return(ShellIcon.CreateFromIcon(null, false, false, ext)); }
public override ShellIcon GetIcon(bool open) { //return ShellIcon.CreateFromFile(@"C:\Windows\System32\Shell32.dll", (int)(open ? Shell32Icon.OpenFolder : Shell32Icon.Folder), true, false); return(ShellIcon.CreateFromIcon(null, false, false, "folder")); }