>> Sorry I can't be more helpful.  Perhaps if you posted some code?

I appreciate any idea! Here is the important parts of my code:

1., I made a package named "Package1" . I put a frame1 into it, and this 
piece of code:


type
  TFrameClass = class of TFrame;  // this TFrameClass is common class to 
factory other frames in future...
  TFrame1 = class(TFrame)
...

  // here is the public declaration of a simple function
  // which returns with the proper class of frame:
  function GetFrameClass:TFrameClass; stdcall;

implementation
...
function GetFrameClass:TFrameClass; stdcall;
begin
  result:=TFrame1;  // pass back the proper class of this frame
end;

exports
  GetFrameClass;
initialization
  RegisterClass(TFrame1);
finalization
  UnRegisterClass(TFrame1);


2. Then I made a simple application wiht Button1:

  // public references
  hnd:HMODULE;
  prc: function:TClassFrame; stdcall;
  fram:TFrame;
...
procedure TForm1.Button1Click(Sender: TObject);
begin
  hnd:= LoadPackage('Package1.bpl');
  prc:=GetProcAddress(hnd,'GetFrameClass');
  if Assigned(prc) then
    fram:=prc.Create(Form1);

  fram.parent:=Form1;

-------------------
I reach this point without any error. The frame has been created but 
cannot be seen! If I do a bit of woodwork the frame can be forced to 
shown (it's ridiculous):

eg.:  Form1.Hide;  Form1.Show; 
OR:  Form1.Perform(CM_VISIBLECHANGED,0,0);
OR: as I mentioned with Project/Options/Packages/"Build with runtime 
packages" check, but I must avoid this way...

fram.show, visible:=True, etc, has NO ANY effect.

I cannot belive this is the proper way to solve this problem. I have 
experienced this effect on D2005 and 7 as well. What the hell is it? 
What do I wrong? (I'm gonna mad)

Thanks for advance:
m.

___________________________________________________________________________
"AZ ŐSKORBAN A HOMO SAPIENS 6-8 m2 ALAPTERÜLETŰ BARLANGBAN LAKOTT. A XXI.
SZÁZADBAN ÖNNEK MILYENEK AZ IGÉNYEI? "    http://www.realisingatlan.hu



__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi-talk

Reply via email to