Pay attention to the differences in form and frame in your project.
First, the source of project.dpr:
program Project1; uses Forms, Unit1 in 'Unit1.pas' {Form1}, Unit3 in 'Unit3.pas' {Frame3: TFrame}; {$R *.res} begin Application.Initialize; Application.MainFormOnTaskbar := True; Application.CreateForm(TForm1, Form1); Application.Run; end.
Differences:
- Frame as a more detailed commentary to tell the IDE which designer should use
- The form can be autocreated.
Dfm Files:
object Form1: TForm1 Left = 0 Top = 0 Caption = 'Form1' ClientHeight = 348 ClientWidth = 643 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] OldCreateOrder = False PixelsPerInch = 96 TextHeight = 13 end
and
object Frame3: TFrame3 Left = 0 Top = 0 Width = 320 Height = 240 TabOrder = 0 end
A frame does not have these properties:
- Title
- Clientheight
- ClientWidth
- Color
- Font.charset
- Font.color
- Font.height
- Font.name
- Font.Style
- OldCreateOrder
- PixelsPerInch
- Textheight
Sidenote: Frame does not have these events:
There is no global variable in the frame:
var Form1: TForm1;
And the frame goes down from TFrame , while the form goes down from TForm .
Note: with Frame / Form inheritance, your steps get a little longer.
- Jeroen
source share