更改可执行文件(exe)的图标.
procedure TForm1.Button1Click(Sender: TObject);
var hExe, hRes, hResLoad, hUpdateRes : THandle;
lpResLock : Pointer;
begin
hExe:=LoadLibrary('c:\890.exe');
hRes:=FindResource(hExe,MAKEINTRESOURCE(1),RT_ICON);
hResLoad:=LoadResource(hExe, hRes);
lpResLock:=LockResource(hResLoad);
hUpdateRes := BeginUpdateResource('c:\899.exe', FALSE);
UpdateResource(hUpdateRes, RT_ICON, MAKEINTRESOURCE(1), LANG_NEUTRAL, lpResLock, SizeOfResource(hExe,hRes));
EndUpdateResource(hUpdateRes, False);
end;