Solved

embedding a graphic in a TImage component

Posted on 2001-08-18
2
146 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
[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
2 Comments
 
LVL 9

Accepted Solution

by:
ITugay earned 50 total points
ID: 6399875
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
ID: 6401861
Thanks ITugay - I appreciate the help

John
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

734 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