Newsgroups : Borland : borland.public.delphi.rtl.win32 : 2006 Dec : Executing a method of a class in a BPL

www.cryer.info
Managed Newsgroup Archive

Executing a method of a class in a BPL

Subject:Executing a method of a class in a BPL
Posted by:"Goncalo Martins" (gmarti..@netcabo.pt)
Date:Fri, 8 Dec 2006 13:33:55

Hello all.
Here's what I want to do: I have a BPL with a form and want to be able to
acess the objects/methods in that form. I can access the form, but I can't
access the objects or methods in it. How can I access them? Here's the code
I use:

var
  HandlePack : HModule;
  CustomerSpecificForm : TForm;
  FormClass : TFormClass;
  begin

  HandlePack := LoadPackage(Edit1.text);

  If HandlePack > 0 then
    Begin
    FormClass := TFormClass(GetClass('TFrmPackageteste'));

    If Assigned(FormClass) then
      Begin
      CustomerSpecificForm := FormClass.Create(Application);
      CustomerSpecificForm.show;
      /// access object and methods (How can I do that?)


      CustomerSpecificForm.Free;
      End;

    UnloadPackage(HandlePack);
    End;

end;

The TFrmPackageteste is registered in the package. Everything works fine in
there. The problem is to access the methods/objects.

Thanks in advance
Best Regards
Goncalo Martins

Replies:

www.cryer.info
Managed Newsgroup Archive