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 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..