Solved

Change an exe-file's icon

Posted on 2004-04-05
3
378 Views
Last Modified: 2010-04-05
How do I change an exe-file's icon? (I want to create a program like Resource Hacker)
0
Comment
Question by:din345
3 Comments
 
LVL 2

Expert Comment

by:ferhad
ID: 10755977
Click Project/Options command. Switch to Application tab and press Load icon button. Select *.ico file you want and press open. After running your application will have new icon.
Hope it will help.
Regards
0
 
LVL 1

Author Comment

by:din345
ID: 10756397
I don't want to change my own app's icon. I mean that I want to change the icon from an other application with my app, like resource hacker (http://www.users.on.net/johnson/resourcehacker/)
0
 
LVL 11

Accepted Solution

by:
shaneholmes earned 25 total points
ID: 10757322
Using Delphi Expert 'Madshi's unit madRes it's fairly easy:

- BeginUpdateResourceW (exe file path)
- LoadIconGroupResourceW (new ico file path)
- EndUpdateResourceW

That's it. Just give in the correct parameters. Must be wide strings.

See here for documentation:

http://help.madshi.net/madResUnit.htm

Here's a direct download:

http://madshi.bei.t-online.de/madCollectionBeta.exe



Shane
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now