在Delphi 7中设置EXE图标 [英] Setting EXE icon in Delphi 7

查看:564
本文介绍了在Delphi 7中设置EXE图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试自定义在Windows资源管理器中显示的图标和Delphi应用程序的桌面快捷方式。

I'm trying to customize the icon that shows in Windows Explorer and in Desktop shortcuts for my Delphi application.

在Delphi 7 IDE中,我加载了项目选项对话框的应用程序选项卡中的所需图标。它显示我想要的图标作为图形。

In the Delphi 7 IDE, I have loaded the desired icon in the Application tab of the Project Options dialog. It shows my desired icon as a graphic.

我不认为这是必要的,但我也将我的图标设置为TMainForm图标属性。

I didn't think it was necessary, but I also set my icon as the TMainForm Icon property.

但是,结果EXE仍然显示默认的D7图标。我缺少什么?

However, the resulting EXE still shows the default D7 icon. What am I missing?

推荐答案

我发现更多的狩猎。我通过从另一个文件夹复制现有项目创建了一个新项目。我忘了在DPR文件的顶部更改程序名,以匹配新项目的名称。不知何故,如果使用错误的名称,它会阻止在生成的EXE文件中更改图标...

I found it after more hunting. I created a new project by copying an existing project from another folder. I forgot to change the program name at the top of the DPR file to match the name of the new project. Somehow, if a wrong name is used there, it prevents the icon from being changed in the generated EXE file...

这篇关于在Delphi 7中设置EXE图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆