请问怎样得到一个控件最顶层的Parent(就是TForm)? 控件放在控件中 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 function GetParentForm(Control: TControl; TopForm: Boolean = True): TCustomForm; showmessage( GetParentForm(self.Button2).ClassName ); 通过递归调用函数function GetParentControl(Control: TControl):TControl;begin if control.Parent <> nil then Result:= GetParentControl( Control.Parnet) else Result:= Control;end; 字符串随机不重复排序 求职:delphi,散分,找到工作再加分 小票打印问题。 如何依据CreateProcess产生的进程ID得到主窗体的句柄? combobox的changge事件的问题。 百分相送,程序运行起来后如何将当前正在运行的EXE删除 如何将 ADODataSet 和 ADOQuery 设置为可更新和可插入? 用DELPHI怎样自动删除程序? 客户端连接服务端的问题 有谁在用kylix 请问怎么样查询某一列中数值最大的出来 panel中放一个label显示字符,怎样使字符来回滚动?
function GetParentForm(Control: TControl; TopForm: Boolean = True): TCustomForm;
function GetParentControl(Control: TControl):TControl;
begin
if control.Parent <> nil then
Result:= GetParentControl( Control.Parnet)
else
Result:= Control;
end;