?
Solved

Change Icon in console app

Posted on 2004-08-08
1
Medium Priority
?
432 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 17

Accepted Solution

by:
Wim ten Brink earned 400 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

764 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