From TfrmMain where the panel (pnMain) is in, I can create and delete forms by calling the procedures, but when I try to call the procedures from the form displayed in the panel, I get External: SIGSEGV when I try to delete the form and create another form using:
frmMain.CreateAndShowForm(Nil, TfrmStart);
Of course you get a SIGSEGV.
CreateAndShowForm(Nil, TfrmStart);
translates into
begin
CloseActiveForm;
Nil:=TfrmStart.Create(Application);
...
which is a complete nonsense.
Parenting a form to a TWinControl is a curious, non-standard behaviour.
As Handoko writes, far better to use TFrames or TCustomControls which are designed to need a parent.
Sry, frmMain.CreateAndShowForm(frmStart, TfrmStart);
I try to create an application where I can view different forms without opening them in new windows. However, only one form may be available at a time.
I think it's like an MDI but without the ability to switch between the forms, maximize, minimize, and so on. Or as a website where every web page here is a form.
I need a nudge in the right direction.