怎么修改EXE的图标 如何修改EXE的图标也就是修改1.exe的图标修改成1.ico把1.ICO导入到1.EXE里面覆盖原来的图标请给出代码 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 project->APPlition修改locn重编译 我郁闷,这么我当然知道我说的是修改EXE图标不是自己的图标是某个EXE的图标我真郁闷 可以试一下BeginUpdateResource+UpdateResource+EndUpdateResource 菜单project->APPlition修改就可以了 www.2ccc.com上去看看那里有这样的例子代码 http://download.csdn.net/down/201190/zhangzii project->options->APPlition->load icon选择一个图标,运行一次OK 郁闷,我说了不是修改自己,是修改其他的EXE,我郁闷了 楼主的意思是修改已经编译好的程序,不是在源程序中修改~~可以找此工具 reshacker具体用法网上搜一下 有毛病,我说了某个文件,并不是自己,郁闷了我要的是DELPHI代码实现,用工具我还来这里问什么, 可以实现,可以实现修改其它程序的EXE图标。也可以实现修改自身的图标,例如可以实现你的程序中带7个图标,在星期一、星期二、星期三、星期四、星期五、星期六、星期日这七天内的图标各不相同。 楼主去网上找下"熊猫烧香"病毒的源码,里面有修改EXE文件图标的详细讲解,我曾经见过,不过没怎么在意.好找的.网上很多. 好象看看用PEiD V0.94 20060510(强大查壳工具)汉化绿色增强版看看用啥编写的 然后用eXeScope反编译软件 就project->options->APPlition->load icon 不好吗,简单实用。 楼主消消火,给你一段代码,自己测试,不要连测试都要别人帮忙,那就是典型的寄生虫了unit ICOEXE;interfaceusesWindows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, StdCtrls, ComCtrls, shellapi;typeTForm1 = class(TForm) Label1:TLabel; Edit1:TEdit; Label2:TLabel; Edit2:TEdit; Button1:TButton; Button2:TButton; OpenDialog1:TOpenDialog; OpenDialog2:TOpenDialog; StatusBar1:TStatusBar; procedure Button2Click(Sender:TObject); procedure Button1Click(Sender:TObject);private { Private declarations }public { Public declarations }end;varForm1:TForm1;implementation{$R *.dfm}procedure TForm1.Button2Click(Sender:TObject);beginClose;end;procedure TForm1.Button1Click(Sender:TObject);constreadlen = 10; //每次读取字节数,可改变icolen = 766; //32*32图标长度,根据研究前126为图标头,后640为图标数据vari, j, itemp, nPos:int64; // nPos为目的图标在目的文件的位置ci, cj:array[0..readlen - 1] of char;SourceFile, DestFile:string; //如果要把记事本图标换成瑞星杀毒软件图标bOK:boolean; //则SourceFile='C:\windows\notepad.exe',DestFile:='C:\Program Files\rising\rav\ravmon.exe' SourceIcon, DestIcon:TIcon;SIconStream, s, sDest:TMemoryStream;beginbOK := false;if OpenDialog1.Execute then SourceFile := OpenDialog1.FileNameelse exit;if AnsiUpperCase(ExtractFileExt(SourceFile)) <> '.EXE' thenbegin ShowMessage(AnsiUpperCase(ExtractFileExt(SourceFile))); exit;end;Edit1.Text := SourceFile;if OpenDialog2.Execute then DestFile := OpenDialog2.FileNameelse exit;if AnsiUpperCase(ExtractFileExt(DestFile)) <> '.EXE' then exit;Edit2.Text := DestFile;SourceIcon := TIcon.Create;case ExtractIcon(handle, PChar(SourceFile), UINT(-1)) of 0: begin ShowMessage('源程序没有图标'); exit; end; 1:;else ShowMessage('源程序有多个图标,本程序选择第一个图标');end;SourceIcon.Handle := ExtractIcon(handle, PChar(SourceFile), 0); //选择第一个图标 DestIcon := TIcon.Create; //选择第N个图标为 ExtractIcon(handle,PChar(Sourcefile), N - 1)case ExtractIcon(handle, PChar(DestFile), UINT(-1)) of0: begin ShowMessage('目的程序没有图标'); exit; end;1:;elseShowMessage('目的程序有多个图标,本程序选择第一个图标替换');end;DestIcon.Handle := ExtractIcon(handle, PChar(DestFile), 0); //选择第一个图标SIconStream := TMemoryStream.Create;DestIcon.SaveToStream(sIconStream);if sIconStream.size <> icolen thenShowMessage('SIcon.size<>icolen');SDest := TMemoryStream.Create;sDest.LoadFromFile(DestFile);i := 0;j := 0; //以下程序查找目的图标在目的程序中的位置while i < sDest.size dobeginitemp := i;j := 126;{ repeat SDest.Position:=i; sDest.read(ci,Readlen); SiconStream.Position:=j; SIconStream.Read(cj,Readlen); i:=i+Readlen; j:=j+Readlen; until (String(ci)=String(cj)) and (i<sDest.size) and (j<icolen);} ci := '';cj := '';while (string(ci) = string(cj)) and (i < SDest.size) and (j < icolen) dobegin i := i + readlen; j := j + readlen; SDest.Position := i; SDest.read(ci, readlen); SiconStream.Position := j; SiconStream.Read(cj, readlen);end;if j < icolen then i := itemp + 1 //没找到elsebegin nPos := itemp; //找到 bOK := true; break;end;end;if bOK = false thenexit; //目标文件二进制码中未找到图标SIconStream.Clear; //将源程序图标存入SourceIcon.SaveToStream(SIconStream);SIconStream.position := 126;s := TMemoryStream.Create;sDest.Position := 0;s.CopyFrom(sDest, nPos); //将目的程序图标前数据拷入s.CopyFrom(SIconStream, 640); //将源程序图标拷入if sDest.size > sDest.Position + 640 then //将目的程序剩余数据拷入beginsDest.Position := sDest.Position + 640;s.CopyFrom(sDest, sDest.Size - sDest.Position);end;s.SaveToFile(Extractfilepath(application.exename) + 'Result.exe');SourceIcon.Free;DestIcon.Free; //改造好的程序存放在本目录Result.exe文件中SIconStream.Free;s.Free;sDest.Free;ShowMessage(Extractfilepath(application.exename) + 'Result.exe');end;//以上程序可以将目的程序的第一个图标换成源程序的第一个图标,经实证很多程序有二个//或更多图标,转换原理相似,不在陈述end. 窗体以ShowModal方式弹出失效 如何提高数据库性能???(高分请答) 换币问题,急求怎么做,在线等!!! 求助,线程异步执行的问题! (alphax(割禾青) 请进!) 真的很急,先谢谢大家了。在线等。 MSSQL数据库,数据类型是DataTime,包含时分秒,要在Select语句中只取日期怎么写? 有关打印预览的问题,高手请进 100分求救 COM编程 怎样更新多个数据表join的数据? record类型就足以为什么还要赋以point,有时后光用record就行,到底什么时用record的point 读取swf文件中影片的大小 关于文件分段读取的问题
重编译
我说的是修改EXE图标不是自己的图标
是某个EXE的图标
我真郁闷
那里有这样的例子代码
project->options->APPlition->load icon选择一个图标,运行一次OK
我郁闷了
可以找此工具 reshacker
具体用法网上搜一下
我要的是DELPHI代码实现,用工具我还来这里问什么,
看看用啥编写的 然后用eXeScope反编译软件
不好吗,简单实用。
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, shellapi;type
TForm1 = class(TForm)
Label1:TLabel;
Edit1:TEdit;
Label2:TLabel;
Edit2:TEdit;
Button1:TButton;
Button2:TButton;
OpenDialog1:TOpenDialog;
OpenDialog2:TOpenDialog;
StatusBar1:TStatusBar;
procedure Button2Click(Sender:TObject);
procedure Button1Click(Sender:TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1:TForm1;implementation{$R *.dfm}procedure TForm1.Button2Click(Sender:TObject);
begin
Close;
end;procedure TForm1.Button1Click(Sender:TObject);
const
readlen = 10; //每次读取字节数,可改变
icolen = 766; //32*32图标长度,根据研究前126为图标头,后640为图标数据
var
i, j, itemp, nPos:int64; // nPos为目的图标在目的文件的位置
ci, cj:array[0..readlen - 1] of char;
SourceFile, DestFile:string; //如果要把记事本图标换成瑞星杀毒软件图标
bOK:boolean; //则SourceFile='C:\windows\notepad.exe',DestFile:='C:\Progra
m Files\rising\rav\ravmon.exe'
SourceIcon, DestIcon:TIcon;
SIconStream, s, sDest:TMemoryStream;
begin
bOK := false;
if OpenDialog1.Execute then
SourceFile := OpenDialog1.FileName
else
exit;
if AnsiUpperCase(ExtractFileExt(SourceFile)) <> '.EXE' then
begin
ShowMessage(AnsiUpperCase(ExtractFileExt(SourceFile)));
exit;
end;
Edit1.Text := SourceFile;
if OpenDialog2.Execute then
DestFile := OpenDialog2.FileName
else
exit;
if AnsiUpperCase(ExtractFileExt(DestFile)) <> '.EXE' then
exit;
Edit2.Text := DestFile;
SourceIcon := TIcon.Create;
case ExtractIcon(handle, PChar(SourceFile), UINT(-1)) of
0:
begin ShowMessage('源程序没有图标');
exit;
end;
1:;
else
ShowMessage('源程序有多个图标,本程序选择第一个图标');
end;
SourceIcon.Handle := ExtractIcon(handle, PChar(SourceFile), 0);
//选择第一个图
标
DestIcon := TIcon.Create;
//选择第N个图标为 ExtractIcon(handle,PChar(Source
file), N - 1)
case ExtractIcon(handle, PChar(DestFile), UINT(-1)) of
0:
begin ShowMessage('目的程序没有图标');
exit;
end;
1:;
else
ShowMessage('目的程序有多个图标,本程序选择第一个图标替换');
end;
DestIcon.Handle := ExtractIcon(handle, PChar(DestFile), 0); //选择第一个图标
SIconStream := TMemoryStream.Create;
DestIcon.SaveToStream(sIconStream);
if sIconStream.size <> icolen then
ShowMessage('SIcon.size<>icolen');
SDest := TMemoryStream.Create;
sDest.LoadFromFile(DestFile);
i := 0;
j := 0; //以下程序查找目的图标在目的程序中的位置
while i < sDest.size do
begin
itemp := i;
j := 126;
{ repeat
SDest.Position:=i;
sDest.read(ci,Readlen);
SiconStream.Position:=j;
SIconStream.Read(cj,Readlen);
i:=i+Readlen;
j:=j+Readlen;
until (String(ci)=String(cj)) and (i<sDest.size) and (j<icolen);
} ci := '';
cj := '';
while (string(ci) = string(cj)) and (i < SDest.size) and (j <
icolen) do
begin
i := i + readlen;
j := j + readlen;
SDest.Position := i;
SDest.read(ci, readlen);
SiconStream.Position := j;
SiconStream.Read(cj, readlen);
end;
if j < icolen then
i := itemp + 1 //没找到
else
begin
nPos := itemp; //找到
bOK := true;
break;
end;
end;
if bOK = false then
exit; //目标文件二进制码中未找到图标
SIconStream.Clear; //将源程序图标存入
SourceIcon.SaveToStream(SIconStream);SIconStream.position := 126;
s := TMemoryStream.Create;sDest.Position := 0;
s.CopyFrom(sDest, nPos); //将目的程序图标前数据拷入
s.CopyFrom(SIconStream, 640); //将源程序图标拷入
if sDest.size > sDest.Position + 640 then //将目的程序剩余数据拷入
begin
sDest.Position := sDest.Position + 640;
s.CopyFrom(sDest, sDest.Size - sDest.Position);
end;
s.SaveToFile(Extractfilepath(application.exename) + 'Result.exe');
SourceIcon.Free;
DestIcon.Free; //改造好的程序存放在本目录Result.exe文件中
SIconStream.Free;
s.Free;
sDest.Free;
ShowMessage(Extractfilepath(application.exename) + 'Result.exe');
end;
//以上程序可以将目的程序的第一个图标换成源程序的第一个图标,经实证很多程序有二个
//或更多图标,转换原理相似,不在陈述
end.