Jump to content

ApplicationForm and FreeForm - what is the difference and what better?


Recommended Posts

For the moment I can understand that difference in calling them


To call Application form we should use


To call FreeForm we should use

var SomeFreeForm:TSomeFreeForm;



// SomeFreeForm.Free; // << somewhere in the code

So - what else different beetwen them?


Is ApplicationForm is more modern - with automatical memory management on it?


What approach is more reliable from your experience?

Link to comment
Share on other sites

hi oliver.


can you upload a sample?


I am trying to do the same.



procedure TfrmMain.OpenFrame(Sender: TObject);
  ts: TUniTabSheet;
  fra: TUniFrame;
  ts := TUniTabSheet.Create(self);
  ts.Caption := (Sender as TUniMenuItem).Caption;
  ts.PageControl := PageCtrl;
  // PageCtrl.TabIndex := -1; // Workaround / Issue #1025 / Nicht mehr notwendig ?!
  PageCtrl.ActivePage := ts;
  fra := TFrameClass((Sender as TUniMenuItem).Tag).Create(self); // type TFrameClass = class of TUniFrame;
  ts.Tag := Integer(fra); // call "TComponent(PageCtrl.ActivePage.Tag).Free;" when close TabSheet (ActivePage) later
  fra.Name := fra.Name + IntToStr(Integer(fra)); // to open a frame more than once
  fra.Align := alClient;
  fra.Parent := ts;
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...