procedure sample(Node: TMyTreeNodeData);implementation{$R *.DFM}procedure sample(Node: TMyTreeNodeData); var temp: string; begin MyNode := Node; with Tfrm1.Create(Application) do begin if mynode... then else .... try ShowModal; finally Free; end; end; end;
没有太大的必要重载Create吧。
2。在Public 部份重构Form 的Create(param_list)方法。在Create 中接收Function的参数.并且完成Init动作。
3.在其他单元中调用该Function
若有不明白的地方可Email :[email protected]
谢谢
var
temp: string;
begin
MyNode := Node; with Tfrm1.Create(Application) do
begin
if mynode... then
else
....
try
ShowModal;
finally
Free;
end;
end;
end;
可以.You Email?