Solved

Change Icon in console app

Posted on 2004-08-08
1
426 Views
Last Modified: 2012-05-05
How do i Change the Icon in console application? i dont want the standard .exe icon.
and also can you change the icon programatically based on parameters?
0
Comment
Question by:c-prompt
1 Comment
 
LVL 17

Accepted Solution

by:
Wim ten Brink earned 100 total points
ID: 11749158
Create an *.rc file with the following contents:

//----------------------------------
MAINICON ICON "YourIcon.ico"
//----------------------------------

And make sure you have an icon file named YourIcon.ico in the same folder. Next add:

{$R 'Yourfile.res' 'YourFile.rc'}

to the main source of your project. This will compile the YourFile.rc to an *.res file and include it in your console application. Since consoles normally don't have a *.res file with icons, this icon will be the one that's displayed.
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

831 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