How to add a tabsheet from a DLL to a pagecontrol on my current form

I have a page control on my main form and i want to add to it differents tabsheets loading them from differents DLLs.
I have created forms with a pagecontrol each of them an add it to a DLL.
Then from my main form i load the dll and get access to the form but when i try to add the tabsheet to my pagecontrol i get the error "cannot assign a tfont to tfont"
tito_rguez2003Asked:
Who is Participating?
 
jpedefConnect With a Mentor Commented:
You need to syncronize your main application and dll. Try passing Application.Handle to dll when initialising it.
Then in dll do:
  ...
  Application.Handle := MainAppHandle;
  ...
0
 
andrewjbConnect With a Mentor Commented:
You may or may not also need to try playing with the following:

(Some hints and ideas, though it's not a solution yet!)

- Whether you use runtime packages or not. (I think both the main app. and dll should be 'Yes')

- Whether you use dynamic RTL or not ( Again, 'yes' for both, I think)

- If you try to export stuff from a dll, you need to use the PACKAGE flag rather than dllimport/dllexport. (At least you do in C++ builder. I'm not sure whether this is identical under Delphi. And it probably doesn't apply here because you're not exporting a class, but I thought I'd mention it for completeness.)
0
All Courses

From novice to tech pro — start learning today.