Jump to content
eniomarconcini

TImageList in BPL Datamodule images not showing

Recommended Posts

TImageList in BPL Datamodule images not showing.

 

Hello. My first thread here.

I'm making a project splitted in packages/modules.
I have main project, that's application.exe.
And I have application modules, eg, employees, customers, in separated projects, but is package (BPL) projects.

As final result I have in exe folder like this:
app.exe
customers.bpl
employees.bpl
dbobjects.bpl
images.bpl

Toolbar images, and button images was stored in TImageList components on a DataModule inside images.bpl package. 

The throuble is: in design-time images in buttons is displayed correctly.  But in runtime, when app.exe is running, toolbar buttons or buttos is displayed without images. 

Any idea?
thanks so  much.

Share this post


Link to post
41 minutes ago, eniomarconcini said:

Toolbar images, and button images was stored in TImageList components on a DataModule inside images.bpl package. 

The throuble is: in design-time images in buttons is displayed correctly.  But in runtime, when app.exe is running, toolbar buttons or buttos is displayed without images. 

Hard to diagnose without seeing your actual setup - how the BPLs load the images, how the EXE loads the BPLs, how the EXE assigns the images to its UI, etc.  Lots of factors here.

Share this post


Link to post

I already found the cause of. i forgot to instantiate the datamodule var reference.

DataModule1 := TDataModule1.Create(Application).

I add this code in main form onCreate event, and all right now. 

This is the DataModule in BPL package. 

 

 

I've programmed in Delphi in 2002 to 2010 and not more. I've back now to do some adjusts in  a little project.

Thanks

Edited by eniomarconcini

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×