Hm, da sist es auch nicht. Wen ich das so mache:
Delphi-Quellcode:
procedure TfrmMain.Button3Click(Sender: TObject);
begin
FotoBook.ShowPreview(FotoBook);
end;
Delphi-Quellcode:
procedure TFotoBook.ShowPreview(FotoBook: TFotoBook);
begin
with TfrmPreview.Create(nil, FotoBook) do
ShowModal;
end;
Delphi-Quellcode:
constructor TfrmPreview.Create(AOwner: TComponent; FotoBook: TFotoBook);
begin
inherited Create(AOwner);
FFotoBook := FotoBook;
end;
procedure TfrmPreview.FormShow(Sender: TObject);
begin
FFotoBook.PageParent := frmPreview;
FFotoBook.Display(0);
end;
Dann kommt bei FFotoBook nur eine leere Klasse an. Die Klasse TFotoBook ihrerseits wiederum beimhaltet auch wieder Objekte und die sind alle
nil. Irgendwie bekomme ich das Objekt nicht durchgereicht.