X
xkdcc
Unregistered / Unconfirmed
GUEST, unregistred user!
我写了个 初始化数据库连接的类TInitClass(非可视化的),
type
TInitClass = class(TObject)
private
{ Private declarations }
FErrForm: TForm;
public
{ Public declarations }
property ErrForm: TForm read FErrForm write FErrForm;
procedure InitDataConnection();
end;
var
InitClass: TInitClass;
另有个窗体TfrmErrorBail,静态创建,有全局变量:
var
frmErrorBail: TfrmErrorBail;
。在InitDataConnection中使用了TfrmErrorBail的showmodal();
在工程源文件中,有:
Application.CreateForm(TfrmErrorBail, frmErrorBail);
InitClass.ErrForm := frmErrorBail;
Application.Run;
我在主窗体的shorform事件调用了InitDataConnection();但运行到Application.Run;时,系统总出错!
有人遇到过这种问题吗?请帮忙解答下,谢了!
type
TInitClass = class(TObject)
private
{ Private declarations }
FErrForm: TForm;
public
{ Public declarations }
property ErrForm: TForm read FErrForm write FErrForm;
procedure InitDataConnection();
end;
var
InitClass: TInitClass;
另有个窗体TfrmErrorBail,静态创建,有全局变量:
var
frmErrorBail: TfrmErrorBail;
。在InitDataConnection中使用了TfrmErrorBail的showmodal();
在工程源文件中,有:
Application.CreateForm(TfrmErrorBail, frmErrorBail);
InitClass.ErrForm := frmErrorBail;
Application.Run;
我在主窗体的shorform事件调用了InitDataConnection();但运行到Application.Run;时,系统总出错!
有人遇到过这种问题吗?请帮忙解答下,谢了!