Does it cause any problem to put self-created frames in published section? lazarus / 21-General ---------------------------------------------------------------------- egsuh · 2021-07-19 06:50 Hi, In following example subFrame1 is not created by putting frame on the form during design time. Instead it is created manually during the TForm1.Create. But does this cause any problem? Sometimes I get error message when I close the form, related with Windows call back function something. The program stops at a line within an .inc file at the closure. Once I move the definition of subFrame1 to private or public section, there are no such problem. I'm not sure whether the error is because of this --- if not this, I have to scrutinize the freeing section of my application. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i type     TForm1 = class (TForm)        subFrame1 : TsubFrame;      private      ...    public       ...    end;  // implementation constructor TForm1.Create(Owner: TComponent); begin     subFrame1:= TSubFrame1.Create(self);     ...end; ---------------------------------------------------------------------- lucamar · 2021-07-19 08:43 It shouldn't cause serious problems but it might confuse the streaming and/or control management mechanism. Better put it in the public section. ---------------------------------------------------------------------- devEric69 · 2021-07-19 09:54 I code my interfaces with frames in forms: I think like Lucamar 100% ==> declare a field in public. Besides, other tools like the object manager, object inspector and its integrated properties editors, ..., may not understand everything (publishing a TForm descendant into a TForm). To sum up: bad idea in published section!