How do I show Application.Icon on a form?

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?
LVL 2
DrBeakerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CrazyOneCommented:
Try this


Image1.Picture.Icon := Application.Icon;


The Crazy One
0
Mohammed NasmanSoftware DeveloperCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mohammed NasmanSoftware DeveloperCommented:
damn slow :(
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

DrBeakerAuthor Commented:
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
DrBeakerAuthor Commented:
Image1.Picture.Icon.Assign(application.icon);

Also seems to work.
0
DrBeakerAuthor Commented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.