Solved

embedding a graphic in a TImage component

Posted on 2001-08-18
2
139 Views
Last Modified: 2010-04-06
Hi

I have derived a component from TImage and I need to have an image showing in the component when I place it on a form as a default image, rather than just having an outline.  It is to be used in a runtime designer.  Is there a way to embed a bmp in the image component at create time without having to load it from a file each time?

Regards

John
0
Comment
Question by:jdthedj
2 Comments
 
LVL 9

Accepted Solution

by:
ITugay earned 50 total points
Comment Utility
Hi jdthedj,

yes, it's easy. Just put your image in *.DCR file.

var
  B: TBitmap;

....
  B := TBitmap.Create.
  B. LoadFromResourceName(Instance, 'IMAGENAME');
...
0
 
LVL 3

Author Comment

by:jdthedj
Comment Utility
Thanks ITugay - I appreciate the help

John
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

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…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

763 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