Board index » delphi » Repost:Loading fames from DLL

Repost:Loading fames from DLL


2003-09-01 10:17:31 PM
delphi157
Hello All;
I am having a problem loading frames from a DLL.
The Frame is created & properties assigned with 1 call:
procedure ShowFrame(AForm: TForm);stdcall;
begin
frmDynamic:= TfrmDynamic.Create(AForm);
with frmDynamic do
begin
Parent:= AForm;
Visible:= True;
BringToFront;
end;// end with frmDynamic
end;
Using this I get an Error message 'Cannot assign TFont to TFont' if I change
the 'ParentFint' Property of the frame to false, it loads fine.
I use another procedure to make sure the frame has loaded:
procedure ShowInfo; stdcall;
begin
ShowMessage('Owner: ' + frmDynamic.Owner.Name + #13#10 +
'Parent: ' + frmDynamic.Parent.Name);
end;
The Message displays the Main form as Owner & Parent, however the frame does
not show on the form.
Loading the same frame with same steps from the calling program NOT from a
DLL, first off doesnt generate error, then shows fine.
Any Ideas where I am Going wrong??
Thanks,
Gary
 
 

Re:Repost:Loading fames from DLL

In article <3f5354fb$XXXX@XXXXX.COM>, Gary Shelton writes:
Quote
I am having a problem loading frames from a DLL.
You have to build DLL and host app with run-time packages for this to work.
Peter Below (TeamB)
Use the newsgroup archives :
www.mers.com/searchsite.html
www.tamaracka.com/search.htm
groups.google.com
www.prolix.be
 

Re:Repost:Loading fames from DLL

Hi!
Quote
You have to build DLL and host app with run-time packages for this to
work.
Only if you use MDI! Everything else works without problems (for me).
regards