[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How do I show Application.Icon on a form?

Posted on 2001-07-15
6
Medium Priority
?
163 Views
Last Modified: 2010-04-06
I want to make a generic About box that pulls all the info from the Version resource information in the .EXE.  I have written 98% of it, but now I'm stuck.  I want to display the program icon on the About box, but I don't want to have to read it from a file, I want to use the image in Application.Icon.

However, one cannot put a TIcon object on a form, and cannot assign a TIcon iamge to a TImage image, so how can I achieve this?

If I cannot take it directly from the Application object, how would I read is from the resource info in the .EXE?
0
Comment
Question by:DrBeaker
  • 3
  • 2
6 Comments
 
LVL 44

Expert Comment

by:CrazyOne
ID: 6284060
Try this


Image1.Picture.Icon := Application.Icon;


The Crazy One
0
 
LVL 22

Accepted Solution

by:
Mohammed Nasman earned 200 total points
ID: 6284068
Hello

  if you want the read the application icon and put it in the image components, that's easy

  Image1.Picture.Assign(application.icon);

Best regards
Mohammed Nasman
0
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 6284070
damn slow :(
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 2

Author Comment

by:DrBeaker
ID: 6284320
I actually did it by

DrawIcom(Image1.Canvass.Handle, 0, 0, Application.Icon,Handle);

which has got to be the fastest way ... unless anyone can see a problem here?
0
 
LVL 2

Author Comment

by:DrBeaker
ID: 6284326
Image1.Picture.Icon.Assign(application.icon);

Also seems to work.
0
 
LVL 2

Author Comment

by:DrBeaker
ID: 6284353
CrazyOne, I strongly suspect that, in some circumstances (specifically repalcing an icon), your solution could cause a memory leak.  If you use it yourself, consider replacing it with Assign calls.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

873 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