MainForm为fsMDIForm,ReportForm为fsMDIChild,FieldLenList为ReportForm中的私有TStrings变量,在ReportForm中生成FRView预览页面,在预览页面中调用ReportForm中的过程(用到FieldLenList)发现FieldLenList出现不能访问数据了。试过其它数据类型都都不行的
整个过程在单个模块的时候没有问题的(即只是把ReportForm改成fsMDIForm,放到多窗口模块中),为什么??表达可能不是很清楚,大家尽量帮忙了!
整个过程在单个模块的时候没有问题的(即只是把ReportForm改成fsMDIForm,放到多窗口模块中),为什么??表达可能不是很清楚,大家尽量帮忙了!
已在A中usesB
TReportForm(ActiveMDIChild).变量
我对你的问题理解有没有错?
to:dlwxn 我不是要在A中用B的变量,而是在A中调用执行B中的过程,发现本来有数据的TStrings型数据变成不能访问了
type
TReportForm = Class(TForm)
Private:
FieldLenList: TStrings;
Public:
procedure ShowReport;(其中用到FieldLenList)
end;
Var ReportWin: TReportForm;
B
Type
FRForm = Class(TForm)
public
procedure PageSet;
end;
implementation
uses A; FRForm.PageSet;
begin
ReportWin.ShowReport;(出现不能访问FieldLenList的错误!)
end;
自己up一下,没人回答晚上结贴.这个是不是跟MDI程序有关系???