case 3751

This commit is contained in:
2020-05-03 17:06:22 +00:00
parent f7013e1056
commit 752b41e301

View File

@@ -7160,6 +7160,10 @@ At first I was happy to find your code that solved my problem, but I did not lik
//extract one selected by index icon from a file.
public static Icon IconFromFile(string Filename, IconSize Size, int Index)
{
//case 3751
if (!File.Exists(Filename)) return null;
int IconCount = ExtractIconEx(Filename, -1, null, null, 0); //checks how many icons.
if (IconCount < Index) return null; // no icons was found.