Solved

embedding a graphic in a TImage component

Posted on 2001-08-18
2
140 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
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

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

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

947 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

19 Experts available now in Live!

Get 1:1 Help Now