本文整理自网络,侵删。
获得控件所在的窗体
需要引用单元:Vcl.Forms
function GetParentForm(Control: TControl; TopForm: Boolean = True): TCustomForm;
示例:
GetParentForm(Edit1);
相关阅读 >>
Delphi monthoftheyear、weekoftheyear、weekofthemonth、dayoftheyear … 相对时间
Delphi xe, xe10, 创建 activeform 和 activex 工程的方法
更多相关阅读请进入《Delphi》频道 >>