窗体可视化继承

1.新建工程

  - 创建基类窗体,设置为不自动创建,保存

  - 创建子类窗体,new - other - inheritable items - 选择基类窗体。

2.已有工程

     -  引用基类单元

  -  修改Class 基类

  -  修改 dfm档,object -> inherited (关键)

inherited Form2: TForm2
  Caption = 'Form2'
  PixelsPerInch = 96
  TextHeight = 13
end
View Code
原文地址:https://www.cnblogs.com/rexhu/p/5507328.html