获得控件所在的窗体

2020-09-24

需要引用单元:Vcl.Forms


function GetParentForm(Control: TControl; TopForm: Boolean = True): TCustomForm;


示例:

GetParentForm(Edit1);

阅读280