Any quick code out there that grabs the icon for a particular exe. For example when someone clicks Paint on my form I would like the icon to appear on the form..
I didn't found the link again... I have lost it...
But here's a code snippet... Hope have use of it...
var
TheIcon: TIcon;
begin
TheIcon := TIcon.Create;
TheIcon.Handle := ExtractIcon(hInstance,
'C:\SOMEPATH\SOMEPROG.EXE',
0);
{Do something with the icon}
TheIcon.Free;
end;
Andreas Nordlund
Software developer
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.