Hallo,
ich erzeuge das Form wie folgt im Main
Delphi-Quellcode:
PROCEDURE TMain.CreateMyFormInplaced(CONST aFormClass: TFormClass; CONST Alignment: TAlign);
VAR
NewForm : Tform;
BEGIN
IF Assigned(aFormClass) THEN
BEGIN
NewForm := aFormClass.Create(Self);
NewForm.Visible := False;
NewForm.BorderStyle := bsNone;
NewForm.Align := Alignment;
NewForm.Parent := Panel1;
NewForm.Show;
NewForm.AutoScroll:=True;
NewForm.Width :=Panel1.Width;
NewForm.Height :=Panel1.Height;
FreeAndNil(FCurrentForm);
// FCurrentForm.Free;
FCurrentForm := NewForm;
END;
END;
und rufe wie folgt auf
Delphi-Quellcode:
procedure TMain.JvOutlookBar1Pages0Buttons0Click(Sender: TObject);
begin
CreateMyFormInplaced(TDBUpdate, alClient);
end;