Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can I bind bitmaps in my component?

Status
Not open for further replies.

serkanb

Programmer
Jan 30, 2002
19
0
0
TR
Hello. I have a problem like this:
I created a class that inherited from TImage. This
component keeps some bitmaps and shows them
at the runtime.

I create bitmaps at the components constructor
procedure. And then load them from bitmap files.
Like this:

constructor TSBMotor.Create(AOwner: TComponent);
begin
inherited Create(AOwner);

FRunningBitmap := TBitmap.Create;
FErrorBitmap := TBitmap.Create;

FRunningBitmap.LoadFromFile('c:\myPath\LEDYESIL1.bmp');
FErrorBitmap.LoadFromResourceName( HInstance,'LEDKIRMIZI1');
end;

The component is working on my computer properly. But on the other machine
it's not working properly. Becouse it's looking for bitmaps.

How can I bind bitmaps in my component. I don't want to intrest with their loacations.

Thanks for your help..
 
I found the problem.
I used *.dcr file to keep bmp's. When I carried them
into *.res file the problem was solved.
Thanks...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top