var
h:hIcon;
IconIndex:word;
begin
h:=ExtractAssociatedIcon(HInstance,PChar(Application.Exename),IconIndex);
DrawIcon(Form1.Canvas.Handle, 10, 10, h);
end;
转载于:https://www.cnblogs.com/tecsoon/archive/2009/03/27/1423721.html