try Excel_xhggb_w.Close;except end;
Excel_xhggb_w:=tExcel_xhggb_w.Create(panel1);
......try xhggb_w.Close;except end;
xhggb_w:=txhggb_w.Create(panel1);
......我有很多这样的过程。我想用变量代替var
f1:tform;begin
f1:=xhggb_w;
try f1.Close;except end;
f1:=tf1.Create(panel1);
end;
f1:=tf1.Create(panel1);这句出错!
Excel_xhggb_w:=tExcel_xhggb_w.Create(panel1);
......try xhggb_w.Close;except end;
xhggb_w:=txhggb_w.Create(panel1);
......我有很多这样的过程。我想用变量代替var
f1:tform;begin
f1:=xhggb_w;
try f1.Close;except end;
f1:=tf1.Create(panel1);
end;
f1:=tf1.Create(panel1);这句出错!
另外你要tf1.create前提是你要定义一下tf1这个类,不然系统怎么create呢。
type
tf1=class
publish
end;
tf1=class
end;