Re: Delphi DLL

[ Related Articles and Replies ] [ DelphiLand FAQ ] [ Delphi Tutorials ]

Posted by Tarnu Daniel on July 12, 2002 at 19:15:50:

In Reply to: Delphi DLL posted by Paulo Maio on December 24, 2001 at 12:06:34:

: I have a EXE program with an MDIForm. I also have a DLL with an MDIChild FOrm. How can I use the form contained in the Dll without error on exit application.

in Dll at event OnClose : Action := caFree;
at event OnDestroy : Form := nill;

Then you must create a procedure

procedure CloseDll;stdcall;external;
  If assign(Form) then FreeAndNill(Form);

This procedure you must export to application and before exit you must call this procedure.

[ DelphiLand FAQ ] [ Delphi Tutorials ]