Solved

embedding a graphic in a TImage component

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi cmd execution 6 67
Create a path if not exists 7 90
Delphi: barcode reading on android platform 1 51
Browsing a TTreeView in Delphi 5 9
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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

832 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