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);這句出錯!
uj5u.com熱心網友回復:
tExcel_xhggb_w是什么型別?uj5u.com熱心網友回復:
用with不行么。。另外你要tf1.create前提是你要定義一下tf1這個類,不然系統怎么create呢。
uj5u.com熱心網友回復:
定義tf1這個類句怎么寫uj5u.com熱心網友回復:
type
tf1=class
publish
end;
uj5u.com熱心網友回復:
type
tf1=class
end;
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/118722.html
標籤:VCL組件開發及應用
上一篇:程式競賽
下一篇:cxGrid 上下行資料進行比較
