Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

embedding a graphic in a TImage component

Posted on 2001-08-18
2
Medium Priority
?
149 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 200 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

670 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