DelphiSoure.comDelphiSoure.com
  Welcome Guest [Login] [Register] [Add/Edit/Delete Resources] [Link Us!] 30 Users Online, September 9, 2010 



Main Menu
   Top 50 Downloads
   Components
   News
   Online Forum
   Tips and Hints
   News Archive
   Gazette Archive
   Links
   Delphi Books
   Advertising
   About DelphiSource

 
Topic: how can I bind bitmaps in my component?
Name: serkanb
Body:
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..


Topic: RE: how can I bind bitmaps in my component?
Name: A
Body:
i'm a newbie myself but i'll try to give a suggestion:u have to specify the path to your resources.in your case it's just a constant and on other machines it might be in onother directory.Try using the ExeName propertie...


Reply to this Topic
Sponsored Links

Advertise Here!

Video component for Delphi/C++Builder
AVI and ASF recording, compression on-the-fly or after recording, live network streaming, media player, DV timecode, DV date/time, DV camcorder control, motion detection, frame capture, frame overlay, TV tuning, videos built from set of images, deinterlacing, video rotation, brightness/contrast, dual display, and more...
[Visit Sponsor]

CoolDev.Com - Award winning Delphi components, CD/DVD toolkits, consulting and offshore development services.
[Visit Sponsor]

Datastead - VCL components for web and multimedia applications.
[Visit Sponsor]


Search DelphiSource.com
  

 
 Top 10 Downloads
 • [12447] ExDBGrid Component Suite
 • [12373] abfLabels
 • [9932] Storage library v2.72
 • [9841] Data Navigator
 • [8999] Audio Tools Library 1.3
 • [6951] Monster FTP
 • [6690] Peer to Peer Component Suite
 • [6370] TIAgaloLED
 • [6366] TAudioMixer
 • [5296] abfComControls

 Featured Book

More Books...
© Copyright DelphiSource 1998 - 2002
Contact Us: delphisource@delphisource.com