Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Which custom module class are you registering for your frame? Which version of Delphi are you using?</p> <p>From my experiments with Delphi 2007, the custom module class which seems to work is TFrameModule. This class is contained in delphivclide100.bpl. Since there is no corresponding delphivclide.dcp you have to load it manually:</p> <pre><code>unit FrameTestReg; interface procedure Register; implementation uses Windows, DesignIntf, FrameTest; procedure Register; var delphivclide: THandle; TFrameModule: TCustomModuleClass; begin delphivclide := GetModuleHandle('delphivclide100.bpl'); if delphivclide &lt;&gt; 0 then begin TFrameModule := GetProcAddress(delphivclide, '@Vclformcontainer@TFrameModule@'); if Assigned(TFrameModule) then RegisterCustomModule(TTestFrame, TFrameModule); end; end; end. </code></pre> <p>My FrameTest unit is very simple, it has no FrameTest.dfm, only the declaration of the new TFrame descendant:</p> <pre><code>unit FrameTest; interface uses Forms; type TTestFrame = class(TFrame) private FHello: string; published property Hello: string read FHello write FHello; end; implementation end. </code></pre> <p>Using TFrameModule class, everything seems to work fine so far. I can create a new descendant of TTestFrame to include in the project and edit its published properties in the Object Inspector, put instances of this new descendant on a form in the IDE, edit their new published properties in the Object Inspector, write event handlers for their child components etc. In the .dfm resource I can see the expected "inline" directive for the instances. I haven't encountered any problem with it so far so perhaps this is the solution.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload