怎样更改已生成的exe文件的ico图标

怎样更改已生成的exe文件的ico图标,第1张

更改已生成的exe文件的ico图标 *** 作如下:

1、打开电脑桌面的ResHacker软件,将exe程序拖进该软件里面去。

2、然后在d出来的页面点击 *** 作下面的替换图标。

3、点击打开含新图标的文件,选中刚制作的新图标文件,在替换的图标里找到AI图标的样式然后点击替换。

4、替换完成后,点击文件的保存按钮,即可完成了exe图标的替换 *** 作。

Icon”就可以看到在各种平台设置Qt程序图标的方法。Setting the Application Icon on WindowsFirst, create an ICO format bitmap file that contains the iconimage This can be done with eg Microsoft Visual C++: SelectFile|New, then select the File tab in the dialog that appears, andchoose Icon (Note that you do not need to load your applicationinto Visual C++; here we are only using the icon editor)Store the ICO file in your application’s source code directory,for example, with the name myappicoico Then, create a text filecalled, say, myapprc in which you put a single line of text:IDI_ICON1ICONDISCARDABLE"myappicoico"Finally, assuming you are using qmake to generateyour makefiles, add this line to your myapppro file:RC_FILE = myapprcRegenerate your makefile and your applicationThe exe file will now be represented with your icon inExplorerIf you do not use qmake, the necessary steps are: first, run therc program on the rc file, then link your application with theresulting res file *** 作如下:首先准备个ICO图标。例如:myappicoico用记事本新建个文件,里面就写一行:IDI_ICON1 ICON DISCARDABLE “myappicoico”保存改名为 myapprc并把它和你的图标myappicoico一起复制到你的QT工程项目的目录。用记事本打开你的QT工程文件(如 “myapppro” ),在里面最后新添一行保存,编译你的工程,成功了吧。

设置VBNET程序图标的方法如下:(1)在“解决方案资源管理器”中,鼠标右键点击应用程序项目,调出右键菜单-->属性(2)在项目属性页中,点击“应用程序”-->点开图标下拉列表框-->(3)在对话框中,选择合适的图标,然后单击“打开”(4)应用程序的图标设置完毕(5)编译后,生成的exe文件换成了刚才设置的图标

设置windows窗口图标的方法:

this->(QIcon("myapppng"));

设置应用程序的方法:

1、在你的工程目录创建一个txt文档,写入:

IDI_ICON1ICON"appico"

2、重命名改文件为rc,比如apprc

3、在工程pro中添加如下代码

RC_FILE=apprc

4、拷贝一张ico的至工程目录,命名为appico,编译即可。

首先在QtCreator中新建一个基于QWidget的工程,我建立的项目名称是ICONproj。然后我们点击左边的帮助按钮,先来看看Qt 的Assistant是怎么说的。
在Assistant的索引中输入setting就可以看到下面的列表中有Setting
the Application Icon,双击它就可以看到右侧窗口中的帮助文档。文档内容很全面,包括如何设置windows、OS
X和linux的程序图标。这里我们介绍如何设置windows下应用程序的图标。
第一步,找到一个你心仪的图标,拷贝到工程的源代码目录中。这里我找了一个图标。
第二步,双击打开ICONprojpro文件,并在文件中添加一行:
RC_ICONS =appico
然后点击左下角的锤子按钮,等待编译完成,就可以看到生成的应用程序了。
需要注意的是,我生成的应用程序所在的目录和你的可能不一样。你可能需要到项目的同级目录中寻找。
我们再来点击绿色运行按钮看看情况。
可以看到,窗口的左上角的图标也变成了我们设置的图标。

qt的版本,是4还是5。你可以查看assistant中的

Setting the Application Icon

里面有详细的设置应用程序图标的说明。

First, create an ICO format bitmap file that contains the icon image This can be done with eg Microsoft Visual C++: Select File|New, then select the File tab in the dialog that appears, and choose Icon (Note that you do not need to load your application into Visual C++; here we are only using the icon editor)
Store the ICO file in your application's source code directory, for example, with the name myappicoico
Then, assuming you are using qmake to generate your makefiles, you only need to add a single line to your pro project file:
RC_ICONS = myappicoico
Finally, regenerate your makefile and your application The exe file will now be represented by your icon in Explorer
However, if you already have an rc file, for example, with the name myapprc, which you want to reuse, the following two steps will be required First, put a single line of text to the myapprc file:
IDI_ICON1               ICON    DISCARDABLE     "myappicoico"
Then, add this line to your myapppro file:
RC_FILE = myapprc
If you do not use qmake, the necessary steps are: first, create an rc file and run the rc or windres program on the rc file, then link your application with the resulting res file

首先,你需要创建一个包含图标的ICO格式的位图文件。VC下:选择 文件|新建,选择对话框中的文件标签,再选择ICON。

将ICO文件保存在程序源代码的目录下,比如命名为myappicoico

假设你使用qmake来生成makefiles文件,你只需要在pro文件中添加一行:

RC_ICONS = myappicoico

最后,重新生成makefile和应用程序。然后,exe文件就会显示你设置的图标了。

不过,如果你已经有了一个rc文件的话,比如myapprc,添加下面的两行。首先,在myapprc中添加一行:

IDI_ICON1               ICON    DISCARDABLE     "myappicoico"

然后在pro中添加一行:

RC_FILE = myapprc

如果你用的不是qmake,必要的步骤有:首先,创建一个rc文件,然后运行rc或者windres程序,最后将你的应用程序和res文件链接在一块就行了。

大多数的EXE文件是不能更改图标的,图标是它本身包含的而exe文件基本上是不支持普通编辑。如果是建立了快捷方式,那么这个快捷方式的图标是可以改的,只要在快捷方式上点击右键,选择属性,就能修改了,备选图标一般是软件本身包含的图标或系统所带的图标。


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/13335880.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-07-17
下一篇 2023-07-17

发表评论

登录后才能评论

评论列表(0条)

保存