Solved

No icon

Posted on 2004-09-08
4
206 Views
Last Modified: 2010-04-05
Hello,

I have GUI application how can I make it have the icon that you would get if your making a console app.
0
Comment
Question by:-Karamja-
  • 2
4 Comments
 
LVL 10

Accepted Solution

by:
Jacco earned 20 total points
ID: 12009654
Hi there,

The icon the app eventually gets resides in the ProjectName.res file. The resource file is included with the project using the

{$R *.RES}

in the DPR file of your project. To view this file use the menu: project/view source.

If you have seen the *.RES in you code create a new project and view the source of the dpr to see where it is.

In this res-file the icon named MAINICON is the one used.

Regards Jacco

(In rare cases: Now it is possible the EXE created does not show this icon. This would be because the EXE standard specifies that the first ICON resource in the EXE will be used. If for some reason there is a resource used with $R that defines an ICON before the ProjectName.RES this icon will be used.)
0
 
LVL 22

Expert Comment

by:Ferruccio Accalai
ID: 12009716
mmm...
the easiest way that i know is the following


program Project1;

uses
  Forms,
  Unit1 in 'Unit1.pas' {Form1};

{$R *.res}

begin
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  application.Icon := nil; //the icon will be showed as in a console app
  Application.Run;
end.
0
 
LVL 2

Author Comment

by:-Karamja-
ID: 12009741
Thanks ;D
0
 
LVL 22

Expert Comment

by:Ferruccio Accalai
ID: 12009768
oopss my mistake, misreaded the Q.

Jacco is right, of course :))

F68 ;-)
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

Suggested Solutions

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

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

16 Experts available now in Live!

Get 1:1 Help Now